Re: pattern matching for ip addresses in a text file

2002-01-07 Thread John W. Krahn
Ken Yeo wrote: > > Hi, Hello, > What is the best pattern matching for ip addresses? I tried $var =~ > /\b\d{1-3}\.\d{1-3}\.\d{1-3}\.\d{1-3}\s/ but the {1-3} didn't work, please > advise, TIA! The correct syntax is to use a comma. \d{1,3} John -- use Perl; program fulfillment -- To unsubsc

Re: pattern matching for ip addresses in a text file

2002-01-07 Thread Jeff 'japhy' Pinyan
On Jan 7, Ken Yeo said: >What is the best pattern matching for ip addresses? I tried $var =~ >/\b\d{1-3}\.\d{1-3}\.\d{1-3}\.\d{1-3}\s/ but the {1-3} didn't work, please You want {1,3}, not {1-3}. Also, should that \s be a \b? And be warned that the number 500 matches /\d{1-3}/ without being "l

pattern matching for ip addresses in a text file

2002-01-07 Thread Ken Yeo
Hi, What is the best pattern matching for ip addresses? I tried $var =~ /\b\d{1-3}\.\d{1-3}\.\d{1-3}\.\d{1-3}\s/ but the {1-3} didn't work, please advise, TIA! Ken Yeo -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]