Validate regular expressions

You can validate regular expressions contained in your Recording Rule conditions in Enterprise Manager.

To use this tool, you will first type a Regular Expression Pattern, then type values in the Match Values area, and finally test these values by clicking the Validate button. This gives you an idea of what values will suit your needs and the associated pattern that must be used for the condition. Face icons tell you visually if Match Values are valid or not.

Procedure 

  1. In Enterprise Manager, click Recording Management > Recording Rules > Conditions.

  2. Click Test Regular Expression.

  3. Enter a value in the Regular Expression Pattern field, referring to the definitions and examples that follow this procedure.

  4. Under Match Value, type the values to which the Regular Expression is matched and then click Validate. If a red icon appears, the match is not valid. If a green icon appears, your proposed value is good and can be used successfully in a condition.

    Click Add to add multiple match values, or click Delete to delete a selected value field.

Example: Testing the "in" regular expression against two values

Consider the following example to better understand how to complete the fields of this tool. This example assumes that you want to test the regular expression “in” against these two values:

  • Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)

  • Mozilla/4.75 [en](X11;U;Linux2.2.16-22 i586)

To perform this test, you would complete the fields in the tool as follows:

  1. In the Regular Expression Pattern field, type the expression you want to test:

    in

  2. In the Match Value field, type:

    Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)

  3. In a second Match Value field, type:

    Mozilla/4.75 [en](X11;U;Linux2.2.16-22 i586)

  4. Click the Validate button.

  5. An icon appears under the Matches column to indicate a successful or unsuccessful match. (In this example, the green smile icon appears to indicate the test expression successfully matches both values).

Additional detailed examples are provided below that show how to test complex expressions.

Configure server-level settings for recording rules

Create a recording rule

Create conditions for a recording rule

Create a schedule for recording rules