Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 romping around the Monastery: (4)
As of 2014-07-11 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (235 votes), past polls