Trying to get familiar with regex and wildcards in XYplorer

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
human_robot
Posts: 9
Joined: 03 Dec 2019 11:43

Trying to get familiar with regex and wildcards in XYplorer

Post by human_robot »

I have a few files that have a prefix I want to get rid of, prefix is like this "NEW__00**_" where the stars should be widlcards (any character).

I don't really get how regex works in XYplorer, I use it in Python all the time (but I'm clearly not a pro)

I've tried a few things in the Regex Rename tool but got no luck so far.

To me this should work but doesn't : "^NEW__00.*_" > ""

How would you do it?

Thank you :)

highend
Posts: 14641
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Trying to get familiar with regex and wildcards in XYplorer

Post by highend »

A single! character is not represented via a .* in regex^^
It's a single dot...

Code: Select all

^NEW__00.._ > 
One of my scripts helped you out? Please donate via Paypal

human_robot
Posts: 9
Joined: 03 Dec 2019 11:43

Re: Trying to get familiar with regex and wildcards in XYplorer

Post by human_robot »

Ok i was certain .* matched anything in regex... The more I dig into regex the more obscure it seems to me haha, thank you for your answer, it worked.

highend
Posts: 14641
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Trying to get familiar with regex and wildcards in XYplorer

Post by highend »

Ofc it matches anything but from 0 times to infinite times

So at least a ** as a wildcard is pointless
One of my scripts helped you out? Please donate via Paypal

Post Reply