in reply to disregard spaces while matching ?
if( $test_string =~ /hello(\s+)world/ig ) { print "FOUND IT!"; } else { print "DIDNT FIND IT!"; }
The "i" will ignore case, and the "g" will allow it to match more than once, or globally.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: disregard spaces while matching ?
by hmerrill (Friar) on Aug 05, 2004 at 12:05 UTC |