Phrase Pattern Matching

Applies to

Bridge by Smartsheet

When using the pattern matching in your phrases, you can pass the value that matches the pattern directly to one or more states.

In this example, we are using a regex pattern that will match a valid email address, capturing the username, domain, and suffix of the email as capture groups i.e. username@domain.suffix and setting them as the values for states in the template called user,domain, and email.

Text

regex:([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}) |user={.},domain={,},email={,}

Regex with capture groups for the username, domain, and suffix part of an email. Using the pipe mapping we can access the result of the regex, {,} is the full match, and values {.} and up to match the number of capture groups, counting from left to right.

The contain pattern, and a regex pattern without capture groups, will only have a value for {,}.

You can use the same index, i.e. {.} for multiple states if you want to set the same value into multiple states, it is not possible however to set multiple values into the same state.