in reply to regex: finding something that doesn't contain a quotation?
Two tests:
use strict; use warnings; use Regexp::Common qw/balanced/; while (<DATA>) { chomp; next if ! /($RE{balanced}{-parens=>'()'})/ or $1 =~ /^\("/; print "$_\n"; } __DATA__ blah.boo(getSomething()) blah.boo("getSomething") blah.boo(getSomething("something else")) blah.boo("getSomething()")
Prints:
blah.boo(getSomething()) blah.boo(getSomething("something else"))
DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom