Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: how to find what's not there with a regex?

by davidrw (Prior)
on Aug 24, 2005 at 13:53 UTC ( [id://486185]=note: print w/replies, xml ) Need Help??


in reply to how to find what's not there with a regex?

Maybe something like this (you could do %matches instead of @matches if desired, as well):
my @matches = $input =~ m/\b(\w+)\s+=( '.*?'|( \S+)+)/sg;
Match the LHS and then the equals sign, and then either a single-quoted string or a sequence of single_space-word sets.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-03-29 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found