sunil9009 has asked for the wisdom of the Perl Monks concerning the following question:
eg: Expected outputAAA-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
I tried the following code, but it resolves partially.aaa-bbb-ccc-2345.xyz.com hira.xyz.com ddd-eee-fff-4567.xyz.com sunil.xyz.com mad.xyz.com
Any help would be greatly appreciatedwhile (<>) { m/\s*(.*?\.xyz.com)/; print "$1 \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl regex
by toolic (Bishop) on Feb 09, 2013 at 23:18 UTC | |
|
Re: perl regex
by Kenosis (Priest) on Feb 09, 2013 at 23:19 UTC | |
|
Re: perl regex (fqdn)
by Anonymous Monk on Feb 09, 2013 at 23:46 UTC | |
by sunil9009 (Acolyte) on Feb 10, 2013 at 07:01 UTC |