The Wild object allows a script to access the in-built pattern matching functions in Opus. Even though most ActiveX scripting languages have their own pattern matching support (usually via a regular expression system of some sort), you may wish to use the one that Opus provides for consistency with internal Opus functions.
You can create a Wild object using the FSUtil.NewWild method. To use the Wild object, you must first give it the pattern to match against (this step is called "parsing the pattern"). You can do this when it is created or later on using the Parse method. Once the object has a pattern you can call the Match method to test a string against the pattern.
Property Name |
Return Type |
Description |
---|---|---|
<default value> |
string |
Returns the current pattern in the Wild object |
Method Name |
Arguments |
Return Type |
Description |
---|---|---|---|
Match |
<string:test> |
bool |
Compares the specified string against the previously-parsed pattern, and returns True if it matches. |
Parse |
<string:pattern> |
bool |
Parses the supplied pattern. The flags string is optional - if supplied it must be a string consisting of one or more of the following characters:
|