in reply to Re: Re: What's the best way to do a pattern search like this?
in thread What's the best way to do a pattern search like this?
Hi, you have two options. If you wish to retain ultimate control split on whitespace and filter the elemets in @array_codes using this (as above)
$code_key =~ s/[.?!:;"'()]//g;
This filters out all the stuff in the char class. Alternatively you can just grab alphanumerics in the first place like this:
@array_codes = <DATA> =~ m/\w+/g;
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: What's the best way to do a pattern search like this?
by supernewbie (Beadle) on Jul 20, 2001 at 14:16 UTC | |
by tachyon (Chancellor) on Jul 20, 2001 at 14:59 UTC |