Abhishek Dave schreef:
Hello ,

i am sticking with a problem to replace all words of a file in such a =
manner that the first and second word need to interchanged.
some thing like ...

100000 100001 20000 20001 ....



so that the output file will be

100001 10000 20001 20000 ....



any helpful regex ???

Just a try, untested:

s/^\s*(.*?)\s(.*?)/$2 $1/

Not sure the ? in *? are necessary though.

HTH, H.


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to