Why can't the ProxySG accept Regular Expressions (regex) in CPL without the double quotation (") mark?

book

Article ID: 167495

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

A regular expression (regex for short) is a special text string for describing a search pattern, it is standardized and can be use in any device that supports regex.

SGOS uses a standard regex syntax, however, some symbols in regex syntax (e.g. [, ], * and etc.) have purpose and meaning in standard CPL policy expressions.

So if your regex requires to use some of this characters or symbols, a double-quotation (") mark at the start and the end of your regex is required. 

i.e.: url.regex="clients[0-9]*.google.com/.*"

If your regex does not contains these special characters or symbols, you can use it without the double-quotation (") mark.

i.e.: url.regex=google.com

This is by design, and usual practice is to include the double-quotation (") mark for regex search pattern.

For more information on Regular Expressions, see Appendix E: Regular Expressions in the CPL reference guide for your version of SGOS.