0 votes

Can Ransack or File locator be configured to scan . with strings that do not contain [a-z] ?
I don't want them to be overlooked if they do not contain alpha characters, I would like the files that do not have alpha characters listed.

by (20 points)

1 Answer

0 votes

You can search for any files that do NOT have an alpha character with the simple regex:

[^a-z]

If the extension separator is OK, e.g. '.', then just add that to the list:

[^a-z.]

Same applies to numbers:

[^a-z.0-9]
by (28.8k points)
...