Skip to main content

Regex Check

Runs on: Shared. Runs on the Community backend or inside a chatbox overlay.

Tests a string against a regular expression. If the pattern is found anywhere in it, the string goes down Pass, otherwise down Fail. The original string is forwarded on both outputs. Use it to detect links, username formats or keyword patterns.

Inputs​

NameTypeDescription
inputstringThe string to test.

Outputs​

NameTypeDescription
passstringThe original string, when the pattern matches.
failstringThe original string, when it doesn't.

Configuration​

  • Pattern: A regular expression, for example https?:// to detect URLs or \d{3,} for three or more digits in a row.
  • Flags: Regex flags such as i for case-insensitive or g for global matching.

Example​

After a Chat Message trigger, use the pattern https?://\S+. Messages containing a URL go down Pass to a Text Moderation check or a timeout effect. Other messages go down Fail and are left alone.