Siebel eScript Language Reference > Methods Reference > Regular Expression Methods >

Properties of Regular Expressions


This topic describes properties of regular expressions. The Siebel ST eScript engine and the Siebel T eScript engine supports these properties. Throughout this topic, the term regexp represents an object instance of a regular expression.

You can write code that uses the Compile Regular Expressions method to modify the attribute of a regular expression instance for one of these properties. For example, if you must write code that modifies the global attribute of a regular expression instance. For more information, see Compile Regular Expressions Method.

Regular Expression Global Property

The Regular Expression Global property is a read-only property that indicates the value of the global attribute of an instance of the regular expression object. The value it returns depends on the attribute:

  • The value g is an attribute of the regular expression. It returns the following value:

    True

  • The value g is not an attribute of the regular expression. It returns the following value:

    False

Format

regexp.global

Example

The following example uses the regular expression global property:

// Create RegExp instance with global attribute.
var pat = /^Begin/g;
//or
var pat = new RegExp("^Begin", "g");
//Then pat.global == true.

Regular Expression Ignore Case Property

The Regular Expression Ignore Case property is a read-only property that indicates the value of the ignoreCase attribute of an instance of the regular expression object. The value it returns depends on the attribute:

  • The value i is an attribute of the regular expression. It returns the following value:

    True

  • The value i is not an attribute of the regular expression. It returns the following value:

    False

Format

regexp.ignoreCase

Example

The following example uses the Regular Expression Ignore Case property:

// Create RegExp instance with ignoreCase attribute.
var pat = /^Begin/i;
//or
var pat = new RegExp("^Begin", "i");
//Then pat.ignoreCase == true.

Regular Expression Multiline Property

The Regular Expression Multiline property is a read-only property that indicates the value of the multiline attribute of an instance of the regular expression object. It determines if Siebel CRM performs a pattern search in multiline mode. The value it returns depends on the attribute:

  • The value m is an attribute of the regular expression. It returns the following value:

    True

  • The value m is not an attribute of the regular expression. It returns the following value:

    False

Format

regexp.multiline

Example

The following example uses the Regular Expression Multiline property:

// Create RegExp instance with multiline attribute.
var pat = /^Begin/m;
//or
var pat = new RegExp("^Begin", "m");
//Then pat.multiline == true.

Regular Expression Source Property

The Regular Expression Source property is a read-only property that stores the regular expression that Siebel CRM uses to find matches in a string, not including the attributes.

Format

regexp.source

Example

The following example uses the Regular Expression Source property:

var pat = /t.o/g;
// Then pat.source == "t.o"

Siebel eScript Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.