RegEx Connector

The Qlik RegEx connector lets you search for or replace data using regular expressions from the Qlik Web Connectors RegEx engine.


In previous versions of the Qlik Web Connectors, the RegEx engine was accessible through the Sentiment and Text Analytics Connector.

Ways to access your data

The RegEx engine is part of the Qlik Web Connectors. You do not need to authenticate this connector to use it.

Loading data from tables

You can use the following tables to select and load data: 

Table Description
SimpleMatch Use this table to match data using regular expressions.
Replace Use this table to replace data that match regular expressions.

Using the Replace table to hide sensitive field data

The Replace table takes in a string, looks for a match based on the regular expression, and replaces the match with a new string. In the example below, the Message box contains a 13 digit string. The Regular Expression field contains the regular expression that matches the first 9 digits of the message. The Replace Text field contains the string that will replace the first 9 digits when the connectors finds a match. The Result table shows the new string after the connector finds a match.

The most effective way to use the RegEx Connector is to pass data from a table into to the RegEx Connector to produce a new table with the connector results. The example script below loads a table from an xlsx file, passes rows of data into the RegEx connector, and produces a new table.


LOAD card_name, "num" FROM [lib://AttachedFiles/card_num.xlsx] (ooxml, embedded labels, table is Sheet1); LET noRows = NoOfRows('Sheet1'); for i=0 to $(noRows)-1 let text = Peek('num', $(i), 'Sheet1'); let card = Peek('card_name', $(i), 'Sheet1'); // Use to link new table with previously loaded data RegExConnector_Replace: // Creates a new table with RegEx Replace values LOAD '$(card)' as card, Result as Replace_Result FROM [http://localhost:5555/data?connectorID=TextAnalyser_RegExConnector&table=Replace&text=$(text)&regEx=%5cd%7b5%7d&replaceText=******&appID=&loadAccessToken=1h7jh3i6h3o7k] (qvx); next drop table Sheet1; // Removes the original table from memory

Peek - script function

NoOfRows - chart function

When you load data with a script like the one above, you should see one table called RegexConnector_Replace that has two fields: card and Result. The original table that is used to pass data into the RegEx engine should not be available in Qlik Sense.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?