arunhorne has asked for the wisdom of the Perl Monks concerning the following question:
Sorry, this is probably a really dumb question but I have this file containing a set of equations. I'm trying to standardise some data sets and so have written a little script to search it using a regex. I want to find all the occurrences of ='s that do not have whitespace on either side. I can do it using the three regular expressions:
m/\S=\S/g m/ =\S/g m/\S= /g
However when I try to combine all of these into one regex as follows it stops working:
m/(\S=\S)|( =\S)|(\S= )/gI'm sure its a silly error but what am I doing wrong?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: Rewriting Three Regexes as One
by jeffa (Bishop) on May 04, 2002 at 14:55 UTC | |
| |
|
Re: Rewriting Three Regexes as One
by arunhorne (Pilgrim) on May 04, 2002 at 11:27 UTC | |
by Sidhekin (Priest) on May 05, 2002 at 02:58 UTC |