0

I want to replace a regex by a string. So I use the fonction str_replace and preg_match like that :

str_replace (preg_match('<user-id type="integer">[0-9]{1,10}<\/user-id>', $file), 'hello', $file)

With that I have an error "preg_match(): Unknown modifier '[' " but I don't why I have that because the regex is right, I test it.

Thank you so much.

DiR95
  • 49
  • 7

0 Answers0