regex - preg_match works in regexbuddy, not in php -


OK, I have this regex which I have created and it works fine in RegexBuddy, but when I php Below is an example of it not loaded in.

] (. *) \ [/ Code \]

I use it with RegexBuddy:

Pre>

And by checking the Dot matches Newline, I have made the case insensitive, but it also works like this.

Here is the PHP:

 to display on the screen>  $ q = "[code] 
html code

So you can see that I am using [code] [/ code] and once I remove it, I can display the html code instead of render HTML code Will run htmlentities ()

Whether you are adding a forward slash between your pattern (/ code) Delimit your pattern with something else (I like!).


Comments