Calling Regex Experts
Dan Wilson
dan at acucore.com
Fri Feb 11 09:00:48 MST 2005
On Fri, 2005-02-11 at 08:54 -0700, Benjamin Schmuhl wrote:
> On Fri, 2005-02-11 at 07:18 -0700, Dan Wilson wrote:
> > "... blahblah the brown fox jumped over $blahblah ..."
> >
> > I want to manipulate/replace the 'blahblah', but not the '$blahblah'.
> > How would I go about doing this? I've got the following regex, but it
> > doesn't do the trick:
> >
> > "/(([^\$])blahblah)([^_])/is"
>
>
> " blahblah" should do it, no? As it has a space before it and the other
> is preceded by a $.
Sorry... I guess I should have provided a better example:
The sample text is more like:
'type="blahblah" and type="$blahblah"'
So the " blahblah" won't work... the "[^_]" part of the regex is for
something else that is working fine.
Any other suggestions?
-Dan
More information about the PLUG
mailing list