Hi,
I have a regular expression that I've created to find code comments in a piece of text which looks like this...
(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|(//.*)
If I try to put this into preg_match_all in my PHP script however it returns the error:
Warning: preg_match_all() [function.preg-match-all]: Unknown modifier '|'
Does anybody know how to modify my regexp to work in PHP?
Thanks in advance for any help you can offer!
Tom
I have a regular expression that I've created to find code comments in a piece of text which looks like this...
(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|(//.*)
If I try to put this into preg_match_all in my PHP script however it returns the error:
Warning: preg_match_all() [function.preg-match-all]: Unknown modifier '|'
Does anybody know how to modify my regexp to work in PHP?
Thanks in advance for any help you can offer!
Tom