in reply to Regex to extract number from text file
'\d' is used to match the digits in regular expressions. You can write the regular expression like
while (<FH>) { print "Matched Number:",$1 if(/(\d+)/g); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex to extract number from text file
by GrandFather (Saint) on Feb 18, 2009 at 20:32 UTC |