Is there a way to explode a string with different separators/delimiters, for example this string
code code code (1) code code@ (2) code code code (3) code (4)
The 2 is the number I want to get as the result, is there an easy way to do this with php?
If you’re trying to get the data inside of the parentheses, the following code will match that for you:
If you’re trying to split the string using the delimiter of
(<some-number>), the code below will work for you: