6603Re: [edit+] RegEx Help for Find in Files
- Dec 2, 2010On 12/02/2010 08:56, omcmiami wrote:
> I'm trying to find the correct Regular Expression to use (actuallyRudy,
> exclude) files when using the the "Find in Files" search utility.
> I have a VERY large number of backup files that have been renamed as such:
> I'm trying to exclude these files when doing a "Find in Files" search.
> I've been unable to write a usable RegEx to exclude files named in this
> manner - namely, any file with ####-##-## in the file name. Since
> nothing I've tried seems to work, I'm not even sure RegEx's can be used
> in the EXCLUDE field.
> Can you use a RegEx in the Exclude field of "Find in Files"?
> If so, any ideas on a proper RegEx to exclude ####-##-##?
> Thank you in advance...
You are right, the "Exclude" field in the "Find in Files" window only
accepts DOS file name "globbing" patterns, which are very limited. Just
in case, below is a reference to the pattern matching rules for DOS:
'*' Matches zero or more characters, except a '.'
'?' Matches any single character
'.' Matches a literal '.'
To exclude files with the patterns you mentioned, you can try something
However, this will not do exactly what you expect. keep in mind that
"?" stands for "any character," not just a digit. That pattern will
then exclude anything that has "four characters, followed by dash,
followed by two characters, followed by a dash, followed by two more
characters, followed by the extension." In will exclude,
"header-2010-08-016.htm", but it will also exclude "fred-01-foo.htm".
Unfortunately, this is as good as it gets with the EditPlus built-in
search. For more elaborate searches, you may want to try a dedicated
searching tool, like Agent Ransack, which is free:
- << Previous post in topic Next post in topic >>