Print Download PDF Send Feedback

Previous

Appendix: Regular Expressions

In This Section:

Regular Expression Syntax

Disabling QoS Acceleration Support

Regular Expression Syntax

This table shows the Check Point implementation of standard regular expression metacharacters.

Metacharacter

Name

Description

\

Backslash

escape metacharacters

non-printable characters

character types

[ ]

Square Brackets

character class definition

( )

Parenthesis

sub-pattern, to use metacharacters on the enclosed string

{min[,max]}

Curly Brackets

min/max quantifier

{n} - exactly n occurrences

{n,m} - from n to m occurrences

{n,} - at least n occurrences

.

Dot

match any character

?

Question Mark

zero or one occurrences (equals {0,1})

*

Asterisk

zero or more occurrences of preceding character

+

Plus Sign

one or more occurrences (equals {1,})

|

Vertical Bar

alternative

^

Circumflex

anchor pattern to beginning of buffer (usually a word)

$

Dollar

anchor pattern to end of buffer (usually a word)

-

hyphen

range in character class

Using Non-Printable Characters

To use non-printable characters in patterns, escape the reserved character set.

Character

Description

\a

alarm; the BEL character (hex code 07)

\cX

"control-X", where X is any character

\e

escape (hex code 1B)

\f

formfeed (hex code 0C)

\n

newline (hex code 0A)

\r

carriage return (hex code 0D)

\t

tab (hex code 09)

\ddd

character with octal code ddd

\xhh

character with hex code hh

Using Character Types

To specify types of characters in patterns, escape the reserved character.

Character

Description

\d

any decimal digit [0-9]

\D

any character that is not a decimal digit

\s

any whitespace character

\S

any character that is not whitespace

\w

any word character (underscore or alphanumeric character)

\W

any non-word character (not underscore or alphanumeric)

Disabling QoS Acceleration Support

If you have a QoS policy created for R77 and earlier, you will have to disable QoS acceleration to use other features.

To manually disable QoS acceleration:

  1. On the Security Gateway, run: cpconfig to turn off SecureXL and CoreXL.
  2. Reboot the Security Gateway.
  3. After reboot, run:

    cpprod_util CPPROD_SetValue FG1 FgWithAcceleration 1 0 1

To manually enable QoS acceleration:

  1. On the Security Gateway, run:

    cpprod_util CPPROD_SetValue FG1 FgWithAcceleration 1 1 1

  2. Use cpconfig to turn on SecureXL/CoreXL.
  3. Reboot the Security Gateway.