Skip to main content


Regular Expressions (regex) (Databricks)

You can add regular expressions (regex) to AutoActions templates when you narrow the scope of User and Workspace with Only or Except. You must first select the scope (User or Workspace) and only specify the regular expressions in the Transform box. Ensure always to select a scope before you specify the regex.


Keyword regex is mandatory. The regex keyword is similar to substitute s in regular expressions. The regular expression must be in the following format:



  • {reg_exp_string}: Replace with a Java regular expression. For documentation of Java regular expression, see Oracle documentation.

  • {transform}: Replace with a transform string, which typically contains a reference to a capturing group that can be referenced with $1. See Oracle documentation.

Example: regex/^.*(my_user).*/$1/

This example matches any string that contains the "my_user" string.

In the following example, regex is used to define the user scope.

"name_by_user":"Long Running Databricks Job with Include owner",
"description_by_user":"Long Running Databricks Job with include owner email",
"rules":[{"OR":[{"scope":"Databricks jobs",
"compare":">=","value":5000},{"scope":"Databricks jobs","metric":"cost",