How to Use Regular Expression for Report Segmentation

Last updated

Regular expression allows you to use a sequence of symbols and characters to perform a string or pattern match. VWO provides limited support for using regular expressions for defining visitor segments during reports segmentation.

  • Open the reports section of the test you want to view
  • Click the All Visitors drop-down select the condition as Current URL
  • Next, select  Matches Regex (case insensitive) as the condition operator
  • Enter the regular expressions as appropriate for the URLregex-1

The following regular expression features are supported in VWO report segmentation:

Case Insensitive

All regular expressions are case insensitive. VWO does not perform case-match for any string.

Anchoring

Most regular expression implementations match part of text. To enter a regular expression matching the end and start of a string, use ^ and $ in the expression respectively. VWO regular expression support for requires all patterns to be completely anchored.

For example, to match the string ‘I am a VWO user’, you can enter the regular expression as follows:regex1

Wildcards

VWO post-segmentation feature (report segmentation) supports the following wildcards:regex2

Grouping

The following forms of grouping are supported:regex3

Escaping Reserved Characters

There are certain characters that form a part of the regular expression language. To match these characters, these characters must be escaped. For example, the ? character is a reserved character in regular expression. To match this character in the string, it needs to be escaped like abc\?

The following characters are reserved and must be escaped if the intended use is to match that character:

regex4

Contact Us / Login

Product
Resources Home