Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

IsRegEx - script and chart function

IsRegEx() returns whether the specified text is a valid regular expression.

This function performs regex operations that are case-sensitive. You can alternatively use the variant IsRegExI() to perform case-insensitive regex operations.

Syntax:  

IsRegEx (expr [, debug])

Return data type: dual

Arguments
Argument Description
expr String expression containing the regular expression to evaluate.
debug Optional argument. If any value is specified for this argument, the expression returns a text hint outlining how an invalid regular expression might be fixed.
Function examples
Example Result
IsRegEx('[a-z]') Returns -1 (true).
IsRegEx(']0-1[', 1) This example returns an error message with a hint to correct the invalid regular expression ]0-1[.
IsRegEx('[a-z') Returns 0 (false). No error message is shown because the debug argument is not specified.

When to use it

You can use IsRegEx() to test whether the regular expressions you write are valid in Qlik Sense. Foe example, you can load a table into your app with input text and an evaluation of the text's validity as regex.

Example 1 – loading validity of regex into data model

Example 2 – only loading valid regex into data model

Example 3 – chart expressions

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!