I have several types of texts, for example: $ticker="08.070.838/0001-63.offset(1)"
.
I want to capture the text and the digit, if any, that is enclosed in parentheses to make it the "08.070.838/0001-63.offset+1"
form.
I am trying to use the% regex '(\S*)\((\d)\)'
used in php by preg_match
as follows:
if(preg_match('(\S*)\((\d)\)', $ticker, $match)) $ticker=$match[0]."+".$match[1];;
However you are returning the error message:
Warning: preg_match (): Unknown modifier '\'.
Would anyone know what's wrong with any of these \
?