How to use regular expressions in "available when"?


  1. Are regular expressions available in functions like "available when", or not?

  2. If regular expressions can be used, can someone please give me a hint how to do this?

    Focused Window Title Contains: "Fastmail"
    Focused Window Title Does Not Contain: "compose new"

The problem is, "Available When" only allows one choice.

As far as I know you cannot select applications by regular expressions.

In the case of the Focused Window:

In general you can use regular expressions when

  • it explicitly says “regular expression”
  • or when you see the term “match(es)”

“Contain” means string matching.

1 Like

Very often, regular expressions are available anywhere you can type in text.

From this thread:
###Places where Regular Expressions can be used

See the above thread for more examples and discussion.

1 Like

In Keyboard Maestro, the term “matches” implies regular expressions.

In the menu, select Available when a focussed window title matches.

1 Like

Thank you Tom, JM, and Peter, for those details.
I will read and study more.