On Thu, Feb 07, 2002 at 11:27:53AM -0600, Frank wrote:
> All, 
> 
> My input looks like this
> ==============
> 5544#1341343BORIS
> 6200#321BOWSER
> 89232652#6213VERONICA
> ===================
> I want to put a delimiter (#) between the rightmost number and the left most
> alpha
> Resulting in 
> ================
> 5544#1341343#BORIS
> 6200#321#BOWSER
> 89232652#6213#VERONICA
> 
> Any suggestions for a regex that will do this?
> 
> Thanks,
> Frank
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
---end quoted text---

while (<IN>){
        s/(?<=\d)\W(?=[a-z]/#/i; # look-aheads/behinds
        print OUT;
}

this could be a one liner if you used perl -pi ;)

-- 
 Frank Booth - Consultant
Parasol Solutions Limited.
(www.parasolsolutions.com)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to