rapide has asked for the wisdom of the Perl Monks concerning the following question:
What I want is to have:my $line = 'One animal="ap3!" and another one fish="s4lm%%on" can all be eaten. (So can the bird="sparr0w!$$")';
The solution I have tried so far does not work:$something{animal} => ap3! $something{fish} => s4lm%%on $something{bird} => sparr0w!$$
while($line =~ s/([\w\d\_]+)="(.+)"//) { $something{$1} = $2; }
Any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular Expression: Matching arbitrary characters
by moritz (Cardinal) on Dec 01, 2008 at 14:11 UTC | |
|
Re: Regular Expression: Matching arbitrary characters
by JavaFan (Canon) on Dec 01, 2008 at 14:12 UTC | |
|
Re: Regular Expression: Matching arbitrary characters
by lostjimmy (Chaplain) on Dec 01, 2008 at 15:01 UTC | |
by graff (Chancellor) on Dec 02, 2008 at 03:24 UTC | |
|
Re: Regular Expression: Matching arbitrary characters
by jethro (Monsignor) on Dec 01, 2008 at 14:38 UTC |