Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: regex: finding something that doesn't contain a quotation?

by prasadbabu (Prior)
on Feb 11, 2006 at 04:12 UTC ( #529520=note: print w/ replies, xml ) Need Help??


in reply to regex: finding something that doesn't contain a quotation?

Your question is somewhat not very clear, but if i understood correctly, this works fine.

use strict; use warnings; use Regexp::Common qw/balanced/; #my $string = 'blah.boo(getSomething())'; my $string = 'blah.boo("getSomething")'; my ($match) = $string =~ /blah.boo($RE{balanced}{-parens=>'()'})[^;]*; +/; print $string, "\n" if ($match !~ /"/);

Prasad


Comment on Re: regex: finding something that doesn't contain a quotation?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://529520]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2014-09-17 13:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (81 votes), past polls