use warnings; use strict; while (<DATA>) { while (/\s*([\S]+\.xyz\.com)/g) { print "$1 \n"; } } __DATA__ AAA-BBB-CCC aaa-bbb-ccc-2345.xyz.com aa-dg-hj hira.xyz.com ddd-eee-fff-4567.xyz.com ddd-eee-fff vffg.xyz sunil.xyz.com mad.xyz.com
In reply to Re: perl regex
by toolic
in thread perl regex
by sunil9009
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |