Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Swap Input lines

by brx (Pilgrim)
on Apr 19, 2012 at 10:09 UTC ( [id://965902]=note: print w/replies, xml ) Need Help??


in reply to Re: Swap Input lines
in thread Swap Input lines

This is a detail, but this regex  /^([a-z][a-z\s]*[a-z])(\W+)(\d[\d-]*\d)$/i is too specific.
Input file contains lines with "x=y" format, so we must only search for "=" -- see jwkrahn's contribution: Re: Swap Input lines.
Here some examples where this regex doesn't match:
Jean-Paul Goude = 22-22 Marcel Duchamp = One-Two-Two Victoire Passage = 118_218 Philip K. Dick = 123-456

Replies are listed 'Best First'.
Re^3: Swap Input lines
by trizen (Hermit) on Apr 19, 2012 at 10:20 UTC
    You are right. I misunderstood the OPs problem.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-18 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found