RegExp pattern to remove the last x number of characters

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
netizenk
Posts: 15
Joined: 27 Oct 2020 05:24

RegExp pattern to remove the last x number of characters

Post by netizenk »

What is the RegExp pattern to remove the last x number of characters?

With this one ^(....) > I can keep the last number of characters denoted by number of dots but no combinations of .* and parenthesis got me a result to keep all the characters in front and remove the number of last characters I need to...

BTW, is XY RegExp syntax documented anywhere? I couldn't find anything in the help file?

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: RegExp pattern to remove the last x number of characters

Post by jupe »

RegExp rename ?

files only:
(.*)(.{5})(\.[^.]+) > $1$3

The syntax is the same as vbscript regex, so google that.

netizenk
Posts: 15
Joined: 27 Oct 2020 05:24

Re: RegExp pattern to remove the last x number of characters

Post by netizenk »

That worked great, appreciated.

Post Reply