in reply to Re^2: Need some help with Regex
in thread Need some help with Regex
Your A-Za-z should probably have been character classes, i.e. [A-Za-z] (or maybe simply \w, which also includes 0-9 and _ ). Try
#!/usr/bin/perl -l $_ = `nslookup 209.197.123.153`; print $1 if /name\s*=\s*(([A-Za-z]+\.){2,})/; __END__ www.perlmonks.org.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Need some help with Regex
by perlmonk1 (Initiate) on Feb 07, 2010 at 15:27 UTC | |
by GrandFather (Saint) on Feb 07, 2010 at 19:43 UTC |