Skip to main content

COMMAND_VARIABLE_REGEX_QUOTES

Static COMMAND_VARIABLE_REGEX_QUOTES 

Source
pub static COMMAND_VARIABLE_REGEX_QUOTES: LazyLock<Regex>
Expand description

Regex to match variables from a command, with a capturing group for the name.

This regex identifies if variables are unquoted, single-quoted, or double-quoted:

  • Group 1: Will exist if a single-quoted placeholder like ‘{{name}}’ is matched
  • Group 2: Will exist if a double-quoted placeholder like “{{name}}” is matched
  • Group 3: Will exist if an unquoted placeholder like {{name}} is matched