in reply to regex - problem with the loop I believe or maybe the regex itself ?
I just want to go from dIonly to the first workset(( including some text and then two parenthesis at the end ))Using your original code this works for me - note that I took out the colon (:) from dIonly.
foreach $str (@reversedarray) { if ($str =~ /\bdIonly\b.*?\bworkset\b\(\(([^)]*)/ ) { print "content of workset before dIonly: $1\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex - problem with the loop I believe or maybe the regex itself ?
by trummelbummel (Initiate) on Feb 13, 2014 at 02:20 UTC | |
by tangent (Parson) on Feb 13, 2014 at 03:52 UTC |