Match statement in provision applies to all devices due to regex formatting - Edge SWG
search cancel

Match statement in provision applies to all devices due to regex formatting - Edge SWG

book

Article ID: 444882

calendar_today

Updated On:

Products

Management Center Management Center - VA

Issue/Introduction

A single-line match statement in an Edge SWG (ProxySG) provision fails to filter devices correctly. Instead, the policy contents apply to all devices in the environment even when `device.memberOf` criteria are specified.

Environment

 

  • Management Center
  • Edge SWG (ProxySG)
  • Policy Provisioning

 

Cause

The regular expression within the `match()` function contains extra spaces, leading pipes, or trailing pipes. These formatting errors cause the logic to fail parsing, which the system interprets as a "match all" condition or ignores the filter entirely.

Resolution

Sanitize the regular expression pattern by removing all unnecessary spaces and ensuring no empty segments exist between pipes.

  1. Locate the match statement in the provision logic.
  2. Format the string to ensure values are separated only by a single pipe (|) with no spaces.
    • Incorrect: ${if device.memberOf;match( SiteA | SiteB | )}
    • Correct: ${if device.memberOf;match(SiteA|SiteB)}
  3. Remove any trailing pipes at the end of the list.
  4. Apply the updated provision to the Edge SWG and verify filtering.

To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on your respective region.

Additional Information