Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Help with this simple regex

by Jim (Curate)
on May 28, 2013 at 20:01 UTC ( [id://1035714]=note: print w/replies, xml ) Need Help??


in reply to Re: Help with this simple regex
in thread Help with this simple regex

I modified your regular expression pattern slightly to avoid matching beyond the closing quote.

use warnings; use strict; while (my $line = <DATA>) { while ($line =~ m/event="([^("]+)[^"]*"/gi) { print "$1\n"; } } __DATA__ <ID="user_one" event="open(2)"> <ID="user_one" event="system booted"> <ID="user_one" event="system booted"><ID="user_one" EVENT="init(1m)"> <ID="user_one" event="init(1m)"> <ID="" event="">

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found