Hi,
I'm trying to write a regex that will match everything BUT an apostrophe that has not been escaped. Consider the following:
<?php $s = 'Hi everyone, we\'re ready now.'; ?>
My goal is to write a regular expression that will essentially match the string portion of that. I'm thinking of something such as
/.*'([^']).*/
in order to match a simple string, but I've been trying to figure out how to get a negative lookbehind working on that apostrophe to ensure that it is not preceded by a backslash...
Any ideas?
- JMT