Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel eScript Language Reference > Methods Reference > String Methods > Get Regular Expression From StringVar MethodThe Get Regular Expression From StringVar method searches stringVar for a regular expression. It returns one of the following:
FormatTable 39 describes the arguments for the Get Regular Expression From StringVar method.
Usage without Setting the Global AttributeIf you use the Get Regular Expression From StringVar method with the g global attribute not set on the regular expression, then this usage is the same as with the Get Regular Expression From String method. For more information, see Usage Without Setting the Global Attribute and Get Regular Expression from String Method. Usage with Setting the Global AttributeIf you use the Get Regular Expression From StringVar method, and if you set the g global attribute on the regular expression, and if this method finds a match, then it does the following:
For example, assume the following is true:
In this situation the return array includes the following: If you set the g global attribute on the regular expression, then usage for the Get Regular Expression From StringVar method is very different than usage for the Get Regular Expression From String method. For more information, see Get Regular Expression from String Method. Example 1The following example uses the Get Regular Expression From StringVar method with a regular expression whose global attribute is not set: function fn () This example provides the following output: return[0] = etter \\First text that contains primary pattern ...er (any three \\characters followed by "er") Example 2The following example uses the Get Regular Expression From StringVar method with a regular expression whose global attribute is set. The method returns matches of the primary pattern of the regular expression that do not overlap: function fn () This code produces the following output. This output does not include the ttt instance that starts at position 1 or the t t instance because these instances start in other strings that the Get Regular Expression From StringVar method returns: |
![]() |
![]() ![]() |
Siebel eScript Language Reference | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |