Page 1 of 1

Delete all behind a character

PostPosted: Mon Jan 23, 2017 10:34 pm
by cbau1234
Hi all
This tool can probably do all, but seems to also quite complex.

I have a simple task I like to do.
I have hundreds of folder names all build about the same, but all with different text. The only general character is a - somewhere in the name.

like:
test1 - slslsllsl
builing - sksksk
mouse - sfdfdrfdfdfdffd

I like to remove all characters incl. the - from each word, incl. the space before the -
means the output would be:
test1
builing
mouse

Sure this goes somehow.

Thanks
Chris :?:

Re: Delete all behind a character

PostPosted: Mon Jan 23, 2017 10:43 pm
by KenP
This will do what you want.

RegEx (1)
Match: ^(.*) -.*
Replace: \1

Re: Delete all behind a character

PostPosted: Tue Jan 24, 2017 8:24 pm
by cbau1234
Great thanks for this. I will try now all my folders and they are many.
Great tool.