Skip to content

Regular Expressions

Block Description
Block Rendering

Creates a new regular expression.
codeless_regexp_create_regexp
regexp  - Mandatory parameter. Specify a custom regexp expression that can be used in other regexp Codeless blocks as a regexp pattern.
flags - Optional parameter. Allows specifying flags that modify the behavior of the regular expression pattern:
i - Case-insensitive matching.
g - Global matching (find all matches, not just the first one).
m - Multiline matching (treats the beginning and end characters (^ and $) as the start or end of each line).
s - Enables the "dotAll" mode where the dot (.) matches newline character as well.
u - Enables full Unicode matching.
y - "Sticky" matching that matches only from the last match position.
You can combine multiple flags by concatenating them as a string when creating a new regular expression. For example:
codeless_regexp_ex_1
The match method searches a string for a match against a specified pattern and returns an array containing the first occurrence of the matched string value.
codeless_regexp_match
original text  - Mandatory parameter. Specify a string value which will be used for the match operation.
pattern/regexp - Mandatory parameter. Expects the raw text or the Create RegExp Codeless block representing the regexp search pattern. This pattern is used to match a specific value in the original text.
The replace method searches a string for matches against a specified pattern and replaces those matches with a specified replacement string.
codeless_regexp_replace
original text  - Mandatory parameter. Specify a string value which will be used for the replace operation.
pattern/regexp - Mandatory parameter. Expects the raw text or the Create RegExp Codeless block representing the regexp search pattern. This pattern is used to replace values in the original text.
replacement - Mandatory parameter. Identifies the value that must replace matches in the original text.
The search method searches the provided  text for the first occurrence of a specified pattern and returns the index of the first character of the matched string value. Returns -1 if no match was found.
codeless_regexp_search
original text  - Mandatory parameter. Specify a string value which will be used for the regexp search.
pattern/regexp - Mandatory parameter. Expects the raw text or the Create RegExp Codeless block representing the regexp search pattern. This pattern is used to search for values in the original text.
The split method uses a specified pattern to split a string into an array of substrings based on the occurrences of the pattern.
codeless_regexp_split
original text  - Mandatory parameter. Specify a string value which will be used for the split operation.
pattern/regexp - Mandatory parameter. Expects the raw text or the Create RegExp Codeless block representing the regexp search pattern and also the separator.
limit - A numeric value. Specifies the maximum number of elements to include in the resulting array after splitting the string. Any remaining parts that exceed the limit will not be included in the resulting array.
When the number is not specified in this parameter, the operation assumes that all parts of the split string must be included in the resulting array.
When 0 is passed to this parameter, then the operation returns an empty array.
The test method checks whether a string matches a specified pattern and returns a boolean value indicating the result of the match.
codeless_regexp_test
original text  - Mandatory parameter. Specify a string value which will be used for the test operation.
pattern/regexp - Mandatory parameter. Expects the raw text or the Create RegExp Codeless block representing the regexp search pattern. This pattern is used to search for values in the original text.