Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Help with this simple regex

by Jim (Curate)
on May 28, 2013 at 20:01 UTC ( #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
Node Status?
node history
Node Type: note [id://1035714]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2016-06-28 07:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (350 votes). Check out past polls.