in reply to Re: Regex: Capturing and optionally replacing
in thread Regex: Capturing and optionally replacing
But just to clarify... this is the output I am currently getting:
and this is the output I want:Host:hosta-sel-kr-1 Test:testa Host:hostb-sel-kr-1 Test:testb Host:hostc-sel-kr-1,my-domain,com Test:testa Host:hostd-sel-kr-1,my-domain,com Test:testc Host:hoste-sel-kr-1 Test:testxyz Host:hosta-mel-au-1 Test:testabc Host:hosta-mel-au-1 Test:testdef Host:hostxyz Test:testabc Host:someotherhost Test:someothertest
(Notice that the only difference is that the commas in the com domain names have been replaced with periods)Host:hosta-sel-kr-1 Test:testa Host:hostb-sel-kr-1 Test:testb Host:hostc-sel-kr-1.my-domain.com Test:testa Host:hostd-sel-kr-1.my-domain.com Test:testc Host:hoste-sel-kr-1 Test:testxyz Host:hosta-mel-au-1 Test:testabc Host:hosta-mel-au-1 Test:testdef Host:hostxyz Test:testabc Host:someotherhost Test:someothertest
So your solution doesn't actually give the desired result.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex: Capturing and optionally replacing
by ikegami (Patriarch) on Dec 08, 2005 at 16:37 UTC | |
by McDarren (Abbot) on Dec 08, 2005 at 17:13 UTC | |
by McDarren (Abbot) on Dec 09, 2005 at 00:34 UTC | |
by ikegami (Patriarch) on Dec 09, 2005 at 06:18 UTC |