Move string

If you need help on how to use the program
Post Reply
JUANFERNANDEZ
Posts: 1
Joined: 2015-07-31 20:17:22

Move string

Post 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
antp
Site Admin
Posts: 9712
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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
Post Reply