in reply to Regex problem
Then the regexp you've used won't work. It'll brake right after the 'keyword=' part as 'nn' string doesn't match '\d+' expression............. keyword=nn ............
while(<DATA>) { m/^(.+?\s+keyword=)(\d+)(\s+.+)$/; print "$1-" if $1; print "$2-" if $2; print "$3" if $3; print "\n"; } __DATA__ ............ keyword=12 ............
# Under Construction
|
|---|