Regex to mark folders not ending with a digit?

The best solution for finding and removing duplicate files.
Post Reply
rosgr100
Posts: 5
Joined: Sun Jan 01, 2023 5:25 pm

Regex to mark folders not ending with a digit?

Post by rosgr100 »

Hello,

I need to use a regex pattern to mark folders based on their names. Specifically, I'm looking to mark folders their name does not end with a digit.

I've tried several regex patterns, but none seem to be working as expected.

I'm using the .NET Framework Regular Expressions but I'm struggling to find a pattern that correctly identifies folders not ending with a digit.

Could someone please provide a correct regex pattern to achieve this?

Thank you in advance for your help.
User avatar
DigitalVolcano
Site Admin
Posts: 1737
Joined: Thu Jun 09, 2011 10:04 am

Re: Regex to mark folders not ending with a digit?

Post by DigitalVolcano »

This should work for .NET regular expressions though I've not tested it in DC

Code: Select all

.*(?<![0-9])$

https://regex101.com/r/MAJQSZ/1
rosgr100
Posts: 5
Joined: Sun Jan 01, 2023 5:25 pm

Re: Regex to mark folders not ending with a digit?

Post by rosgr100 »

DigitalVolcano wrote: Tue May 07, 2024 7:47 pm This should work for .NET regular expressions though I've not tested it in DC

Code: Select all

.*(?<![0-9])$

https://regex101.com/r/MAJQSZ/1
Unfortunately this didn't work for me.
But i found a solution to it.

Code: Select all

\\[^\\]*[A-Za-z]+\\$
This did the job.
Post Reply