in reply to RE: Re: matching quotes
in thread matching quotes
#!/usr/bin/perl -wl use strict; my $string = 'foo "A small \"dog\" eats pie." bar "foobar"'; print $1 while $string =~ /(?<!\\)"(.*?)(?<!\\)"/gs;
Addendum:
Hmm. It didn't take me fifteen minutes to write this post. perlmonkey must be typing at relativistic speeds. btw--double quotes are not special in a regex; you don't need to backslash them.
|
---|