unable to use a regex

A swapping-ground for Regular Expression syntax

unable to use a regex

Postby xavier5678 » Thu Nov 17, 2016 3:35 pm

I would like to use bulk rename to find all the files which names contains non-ASCII characters. This regex
Code: Select all
[^\x00-\x7F]
works but bulkrename doesn't process it.
I have made several dummy tests: I have no problem using the regex(1) with other regex but this one gives me no result (although it gives me results in notepad++).

I won't use this regex with a replace, I only want to use it to find the matching files.

Any idea why?

Thanks!
xavier5678
 
Posts: 3
Joined: Thu Nov 17, 2016 3:26 pm

Re: unable to use a regex

Postby therube » Thu Nov 17, 2016 6:22 pm

Looks to be working here:

1.RegEx
Code: Select all
Match:  ([^\x00-\x7F])
Replace:  \1


Returns, ®.pdf

Code: Select all
Staples Rewards® - 5% back in rewards and free shipping on staples1.pdf
Staples Rewards® - 5% back in rewards and free shipping on staples2.pdf



I only want to use it to find the matching files.


Everything 1.4.1 Beta is quite adept at finding files ;-).

Enable Regex (Ctr+R), then enter your search, [^\x00-\x7F].
Or, regex:[^\x00-\x7F].
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: unable to use a regex

Postby KenP » Thu Nov 17, 2016 8:48 pm

If you want to use the RegEx to find files with none ASCII characters in the file name presumably you're putting the code in the "Filters (12) / Mask" text-box.

It's filtering the files for me, make sure you've got RegEx checked in Filters (12), if the files still don't filter hit the refresh button at the side of the Mask text-box.

edit: To find file names containing none ascii characters you can also use [^[:ascii:]] in the Filters Mask text-box.
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am

Re: unable to use a regex

Postby xavier5678 » Sat Nov 19, 2016 4:03 pm

It's working, thanks a lot!
xavier5678
 
Posts: 3
Joined: Thu Nov 17, 2016 3:26 pm


Return to Regular Expressions