laziness, impatience, and hubris | |
PerlMonks |
Re: Regx: match without regarding space and caseby GrandFather (Saint) |
on Sep 13, 2007 at 07:14 UTC ( [id://638743]=note: print w/replies, xml ) | Need Help?? |
Use the translate operator (see tr/SEARCHLIST/REPLACEMENTLIST/cds) to delete the spaces, then use a case insensitive match. The code below captures the matched string to retain the original case, but doesn't attempt to figure out the "spacey" version of the match:
Prints:
DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|