kepler has asked for the wisdom of the Perl Monks concerning the following question:
Hello again
I'm trying to extract from a file (which is loaded in a variable) all the strings between "", that is, "example 1 for instance" will save in the array example 1 for instance. I'm trying to use this code: my @strings = $data =~ /\"[^\"]+\"/g; but it's extracting almost every line... Any help would be apreciated...Kepler
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extract pattern match from file
by haukex (Archbishop) on Sep 17, 2016 at 16:14 UTC | |
|
Re: Extract pattern match from file
by AnomalousMonk (Archbishop) on Sep 17, 2016 at 20:07 UTC | |
|
Re: Extract pattern match from file
by Marshall (Canon) on Sep 17, 2016 at 17:02 UTC | |
|
Re: Extract pattern match from file
by johngg (Canon) on Sep 17, 2016 at 21:47 UTC |