---
title: "test · RUAL Documentation"
description: "Returns true if the regular expression matches the text. Mirrors JS RegExp.prototype.test()."
canonical: https://docs.rual.nl/block-types/condition/condition_regexp_test
language: en
---

# test

This block is part of the [`condition`](https://docs.rual.nl/block-types/condition) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Returns true if the regular expression matches the text. Mirrors JS RegExp.prototype.test().

- text required `value` Text to test against.

- expression required `value` The expression without flags.

- insensitive `condition` Makes the whole expression case-insensitive.

Default `false`

- multline `condition` Begin/end anchors will match the start/end of a line.

Default `false`

- match `condition`

True when expression, compiled as a JS-flavor regex, matches anywhere in text (unanchored). Case-sensitive unless insensitive=true; multline makes ^ and $ match at line boundaries. An invalid expression outputs false; an empty expression matches everything (true).

A typical wiring for [test](https://docs.rual.nl/block-types/condition/condition_regexp_test): [value](https://docs.rual.nl/block-types/value/value_default) feeds the `text` pin; [convert to lowercase](https://docs.rual.nl/block-types/value/value_to_lowercase) feeds the `expression` pin; the `condition` out pin feeds [if](https://docs.rual.nl/block-types/value/value_branch).

![Studio canvas example for the test block: typical wiring for test.](https://docs.rual.nl/canvas-examples/condition_regexp_test.png)

### Commonly used with

In production blueprints, this block is most often wired together with:

- [value](https://docs.rual.nl/block-types/value/value_default): feeds into this block. Simply returns the provided value.

- [if](https://docs.rual.nl/block-types/value/value_branch): this block feeds into it. Conditional branching for values (if.. then.. else..). Selects which input value is passed through; it does not route flow.

- [convert to lowercase](https://docs.rual.nl/block-types/value/value_to_lowercase): feeds into this block.

- [=== false](https://docs.rual.nl/block-types/condition/condition_equal_false): this block feeds into it. returns true if the boolean is not true. Despite the === false label this is a !== true test: null, 0 and any other non-true value also pass.

- [trim](https://docs.rual.nl/block-types/value/value_trim): feeds into this block. Removes characters from both ends of a string.

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
