
ichi
User
Jul 19, 2009, 5:55 PM
Views: 4174
|
|
Re: [bktanner] Brand new to regexp question
|
|
|
while(<>){ chomp; if ( index($_ , "[") != -1 ){ @s = split /\]/; @s1 = split /\[/,$s[0]; if ( $s1[-1] =~ /^[0-9.]+$/){ print $s1[-1] ."\n"; } } } NB: not for multiple [..]s in line.
(This post was edited by ichi on Jul 19, 2009, 5:57 PM)
|