Create an Advanced find button with regular expression

I have a Regular Expression that works well in the Advanced Find Dialog (" [0-9]+$" selects filenames with terminal space and numerics.) How can I create a button to provide the same functionality without having to open the Advanced Find Dialog?

Define a filter using your Regex:


Call it "Regex Space Num".

Then, define your button with the command:

Find NAME "Regex Space Num" FILTER IN "{sourcepath}" SHOWRESULTS src,tab

Hi Jerry. I was wondering how you made out. I'm trying to do the same thing. I'm totally new to RegEx deal. I currently have an active topic on this very subject. I I found the code that I need to accomplish my mission. But I don't know how to make it repeat or create a button with it. I did a search and it seems like you and I are the only ones ever to ask a question in regards to an expression and a button.


Regex in buttons = lovely × yum.

A. In a Search-and-Replace:
you can specify the pattern either by saved pattern name, or as a regex string, as in

  1. regex string:
    Rename PATTERN ^([^.]+).(.*?).([^.]+)$# TO "\1 \2.\3" REGEXP TYPE=files
    which replaces dots with spaces in a file name.

  2. With a saved (regex or not) pattern:
    Rename PRESET="Replace Dots With Spaces"

B. In a Select:

  1. regex string:
    Select ^\d{2}\s.* REGEXP
    (selects files starting with two digits and a space)

  2. with a saved filter:
    Select "My Favorite Movies" FILTER

C. In a Find:

Find NAME My_Letters_To_Santa IN D:\

D. I'm sure there are many other regex uses somewhere in the command syntax.
Some that come to mind:

  • A filter label that applies a color or icon to certain files (not in a button)
  • When passing the names of files to a command
  • To change the format of names of files copied to the clipboard