regex - everthing between quotes

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm trying to get a preg_replace to replace wihhin a large string
variable, only words that are NOT preceded by a " or a >. For
instance, in:

While this sentence <em>does</em> serve as a useful example, it is
otherwise uninteresting, and does stand much of a chance, however
"useful" it might be, of publication.

I want the expression to replace the does that is not in em tags, and
the useful that is not in quotes.

Any assitance would be great.

Re: regex - everthing between quotes

ab wrote:
Quoted text here. Click to load it

$sentence = preg_replace(


Site Timeline