devnul has asked for the wisdom of the Perl Monks concerning the following question:
to return the characters from the regex (mixed/upper- lowercase) -- I.E. "Capri", not "capri"? Or to populate it in some variable (it can go into $1, if thats doable)...perl -e 'my $r = q/Capri|Classic/; print $1 if "capri" =~ m/($r)/i;'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting characters from regex pattern
by NetWallah (Canon) on Jun 25, 2008 at 03:57 UTC | |
|
Re: Getting characters from regex pattern
by ikegami (Patriarch) on Jun 25, 2008 at 04:05 UTC | |
|
Re: Getting characters from regex pattern
by kyle (Abbot) on Jun 25, 2008 at 02:32 UTC | |
|
Re: Getting characters from regex pattern
by graff (Chancellor) on Jun 25, 2008 at 06:51 UTC | |
|
Re: Getting characters from regex pattern
by starbolin (Hermit) on Jun 25, 2008 at 06:51 UTC | |
|
Re: Getting characters from regex pattern
by Anonymous Monk on Jun 25, 2008 at 13:36 UTC | |
|
Re: Getting characters from regex pattern
by devnul (Monk) on Jun 25, 2008 at 22:39 UTC |