my @foo = ('hostname.foo.com 19203949', 'hostname12-2.bar.com 1921202' +, 'hostname.hi.foo.com 3838313', 'host12-394.ho.foo.com 31319391'); for (@foo){ my ($sub_dom, $nr) = /^ (.*?) \.foo\.com \s (\d+)/x ; print "$sub_dom: $nr\n" if $nr; }
In reply to Re: Regex how to
by lidden
in thread Regex how to update
by frank_2k4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |