in reply to Re^3: Regular Expression - pattern matching
in thread Regular Expression - pattern matching
and it looks likeif (/^([^_]{2}_[^_]+)_/) { print $1; }
Unfortunately i didn't get the exact pattern which i showed in my output earlier. Can you please correct me if i'm wrong ?? Thank you in advance. -kullsfor(@str) { my $temp; if (/^([^_]{2}_[^_]+)_/) { $temp=$1; print $temp."\n"; } else { ($temp)=$_=~/^([a-z0-9]+)\_/xi; print $temp."\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Regular Expression - pattern matching
by McDarren (Abbot) on Feb 22, 2006 at 17:55 UTC |