Page 1 of 1

Move string

Posted: 2015-07-31 20:23:14
by JUANFERNANDEZ
I need to move a string in a file as example:

nombre1-nombre2.txt --> nombre2-nombre1.txt

How move a string from a character to a position?

Thanks

Posted: 2015-08-01 08:11:55
by antp
It depends what exactly needs to be done.
If you need to swap what is on both sides of a "-" the easiest way to achieve that is to use Regular Expressions.

Expression = (.+)-(.+)\.([^\.]+)
Mask = $2-$1.$3