Using the Regex Tester

You can use the Regex Tester to verify that the regular expression and substitution patterns you enter will produce the desired results.

You can access the Regex Tester when you select the URL Regular Expression match type on the Create a Rule screen.

How to

  1. Go to > CDN > Edge logic Cloudlets.
  2. On the Cloudlet Policies screen, select a policy.
  3. On the Policy Details screen, either create a new version or click the version you want to view.
  4. On the rule manager page, click Add Rule.
  5. On the Create a Rule screen,
    1. select URL Regular Expression.
    2. click Show Regex Tester.
  6. Complete the following fields for the Regex Tester:
    Regex Tester Fields Action
    Regular Expression Enter a regular expression of up to 256 characters to match on the inbound URL, minus the port. For example: (http|https)://www.(vanity|vanity1).com/(.*)
    Redirect URL (Edge Redirector) If applicable, enter the substitution pattern to create the modified URL. For example: \1://www.company.com/\2/\3Note that the pattern uses "\", not "$".
    Path and Query String (Forward Rewrite) Enter the substitution pattern to create the path and query string that will form the modified URL. To define the substitution pattern, use the capture groups in the Regular Expression field. For example: /\1/\2

    Note that the pattern uses "\", not "$".

    Test URL Enter a URL to test whether the regular expression and any capture groups entered produce the desired URL.
    Note: In the THEN section of the rule screen, the Redirect URL or Path and Query String field is disabled, but display value entered in the same field for the Regex Tester.
  7. Click Validate.
  8. In the results section, verify that the values entered produced the desired URLs.