Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Choosing regex delimiters

by Not_a_Number (Parson)
on Feb 06, 2009 at 18:47 UTC ( #741981=note: print w/replies, xml ) Need Help??


in reply to Choosing regex delimiters

Both versions work fine for me on XP Pro with Perl v5.8.8...

Update: Added output

C:\progs\perl>perl -p -e "s/(.*?)\.(\w\w\w),/iif([month]>,$1.$2,0) as +$2/" temp. txt iif([month]>,[01-estimate].jan,0) as jan iif([month]>,[01-estimate].feb,0) as feb iif([month]>,[01-estimate].mar,0) as mar iif([month]>,[01-estimate].apr,0) as apr C:\progs\perl>perl -p -e "s|(.*?)\.(\w\w\w),|iif([month]>,$1.$2,0) as +$2|" temp. txt iif([month]>,[01-estimate].jan,0) as jan iif([month]>,[01-estimate].feb,0) as feb iif([month]>,[01-estimate].mar,0) as mar iif([month]>,[01-estimate].apr,0) as apr C:\progs\perl>perl -v This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 12 registered patches, see perl -V for more detail)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://741981]
help
Chatterbox?
[Corion]: I hope all is well marto! ;) My godson had a surprise visit to the hospital yesterday because he fell and had cut his skin besides his eye, but everything was glued together again and all is well
[marto]: good grief, that's not fun, glad to hear all is as well as could be :)
[Corion]: marto: Yeah - their mother picked all three of them up at the kindergarden to then go to the hospital, and all three of them were well behaved, and all also were quite obedient when they came home, so they recognized the situation
[Corion]: Nice to see that the kids have some understanding of important things that happen and the appropriate behaviour :)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2016-12-08 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (137 votes). Check out past polls.