Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Looking for appropriate Regex

by better (Acolyte)
on Apr 07, 2013 at 13:32 UTC ( #1027366=note: print w/ replies, xml ) Need Help??


in reply to Re: Looking for appropriate Regex
in thread Looking for appropriate Regex

Marvellous!

Thanks a lot!

It works!

But,oops, I found a few exceptions, like: A B 1234 a c d

I tried to fix this by simply extending your script:

$id =~ s/([a-z]) ([a-z]) ([a-z])/$1,$2,$3/;

But this doesn't work!

better

Oh yes, it does!

I just swaped both lines, so that the extended line preceeds your line. And voilą!


Comment on Re^2: Looking for appropriate Regex
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027366]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2014-07-22 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (110 votes), past polls