Common regex patterns

There are a couple of scenarios where regex can help to make sure that a survey is shown on the correct page or pages. We list some of these situations and the regex pattern that can be used below.

To test regex patterns we recommend a third-party site called regex101.

Show a survey only on the homepage

1 example\.com(\/$|$|\?|\/\?)


Show a survey on all pages except on the homepage


1 example\.com(\/\w+)

Case insensitivity

URL conditions are case sensitive, to make them case insensitive, you can add the /i flag :

1 example\.com/i