USP45 has asked for the wisdom of the Perl Monks concerning the following question:
To extract boston.terrier out why wouldn't this work?my $pet_list = 'dog:boston.terrier;cat:orange.tabby';
Doesn't the ;?? mean match semi-colon 0 or 1 times and be non-greedy?@{$pets} = $1 if $pet_list =~ /$some_variable\:(.+);??/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pattern Match n00b
by pc88mxer (Vicar) on Mar 14, 2008 at 20:43 UTC | |
|
Re: Pattern Match n00b
by BrowserUk (Patriarch) on Mar 14, 2008 at 21:02 UTC | |
|
Re: Pattern Match n00b
by skirnir (Monk) on Mar 14, 2008 at 20:59 UTC | |
|
Re: Pattern Match n00b
by jeroenes (Priest) on Mar 14, 2008 at 21:27 UTC |