in reply to Re: Death to Dot Star!
in thread Death to Dot Star!

/"([^"]*)\?"/ almost works, but often, quoted strings allow escapes:
my $myvar = '"Did John say \"go home\" to Suzie?"'; $myvar =~ /"([^"]*)\?"/;
The above code will put " to Suzie" (without the quotes) in $1.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Replies are listed 'Best First'.
Re: (Ovid) Re(2): Death to Dot Star!
by Anonymous Monk on Apr 13, 2001 at 01:34 UTC
    So does yours. If you want to allow \" inside strings, you need to use something like /"((?:\\"|[^"])*)\?"/