Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 musing on the Monastery: (4)
As of 2015-07-03 23:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls