in reply to Help with this simple regex
use warnings; use strict; while (my $match = <DATA>) { $match =~ /event="([^(]+).*"/; print "$1\n"; } __DATA__ <ID="user_one" event="open(2)"> <ID="user_one" event="system booted"> <ID="user_one" event="init(1m)">
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help with this simple regex
by Jim (Curate) on May 28, 2013 at 20:01 UTC |