austinj has asked for the wisdom of the Perl Monks concerning the following question:
CONSTR(1,29) = TEXTHERE, TEXTHERE, TEXTHERE, TEXTHERE, 90.0, (10 * 0.01 /TEXTHERE), ! P.O. TEXTHERE
I have that line and many others like it, I need to be able to match no matter what whitespace is included in between text, parenthesis, commas etc.
so match
" w o r ds ( 345 ) 3 45 other wor ds, aks "
and
"words(345)345otherwords,aks"
and
"words (345) 345 otherwords, aks"
etc. I know I can put a /s* between every character in the expression, is there an easier way? I looked through the modifiers and couldn't find one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regexp to match regardless of whitespace
by MidLifeXis (Monsignor) on May 03, 2012 at 16:43 UTC | |
by austinj (Acolyte) on May 03, 2012 at 16:56 UTC | |
by locked_user sundialsvc4 (Abbot) on May 03, 2012 at 17:22 UTC | |
|
Re: Regexp to match regardless of whitespace
by JavaFan (Canon) on May 03, 2012 at 17:05 UTC |