> For the complete documentation index, see [llms.txt](https://appmaster.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://appmaster.gitbook.io/docs/business-logic/block/functions/string/validate-string-regex.md).

# Validate String (Regex)

Read more about Regex [here](https://en.wikipedia.org/wiki/Regular_expression), and test your patterns visually [here](https://regexr.com/).

**Example:** Validate String(string: "ABC-1234", regex: "(?i)^\[a-z]{3}-\d{4}$") = True.

**Tip:** to include flags, place them in the following format "(?FLAG)", e.g. "(?i)", at the beginning of the regular expression, e.g. "(?i)(?m)^\[A-Z]$".

### Flow Connections <a href="#flow-connections" id="flow-connections"></a>

* \[Input] In - starts the block's execution.
* \[Output] Out - activates when the block has finished its execution.

### Data Connections <a href="#data-connections" id="data-connections"></a>

* \[Input] String (string) - string to be evaluated.
* \[Input] Regex (string) - regular expression to be evaluated against in [RE2 format](https://github.com/google/re2/wiki/Syntax).
* \[Output] Result (boolean) - True if at least 1 match of the regular expression was found in the "String" data input, False otherwise.
