|
|
SQL Table Name:
Interface to the Perl Compatible Regular Expression library.
|
The location (including path) of the regular expression DLL/shared object. Setting this parameter is required for proper functioning of this class.
|
The compiled version of the pattern specified inPattern . When a RegEx object is saved and reloaded, it won't need to compile the regular expression again; this can increase performance if the same regular expression is used often.
When matching, data will be stored here soGetResult can return the proper substring.
Description of the pattern, can be used when saving patterns.
Error message returned from a PCRE call.
Error number returned from a PCRE call.
After callingMatch , a list of matches is stored here. The matches contain a string consisting of the starting and ending offset of the match in the supplied data, separated by a comma. To get the actual matching string,GetResult can be used. The first match is the full string that is matched, subsequent entries contain substring matches (if any).
Name of the pattern, can be used when saving patterns.
If named substring matches are requested, this array will contain them. The index is the name of the substring, the value is an index in theMatches property.
The current regular expression. When setting this property, the pattern is automatically compiled. If an error occurs during compilation, thePatternValid ,ErrorNumber andErrorMessage properties are set accordingly.
Indicates whether the current regular expression in Patternis a valid regular expression and compiled successfully.
|
Returns an instance of an already saved object for a given name.
Returns an instance of an already saved object for a given pattern. If no object with the specified pattern exists and Create is set, one will be created (with the specified name and description). For example,Note that the save may fail if another object, with a different pattern but the same name, is already present. The RegEx object will still be returned, but won't be saved.Set RegEx=##class(Utility.RegEx).GetObject("\w+",1,"Words") If '$IsObject(RegEx) ;Handle error ;RegEx now contains a Utility.RegEx object with the specified pattern. ;The object is saved with name Words.
Returns the string result for a given match index. Index is expected to contain an index into theMatches property; the returned result is the part of the data string this match represents.
Executes the pattern inPattern aginst the supplied data; results are returned inMatches andNamedMatches . Returns 0 if no match was found, or 1 + the number of substring matches (if any) otherwise. If an error occurred during matching, theErrorNumber andErrorMessage properties are set. If Offset is specified, the search will start from that (1-based) offset in the supplied data.
Simple stored procedure that can be used in queries. The first parameter is the pattern to use, the second the data to match with. The return value is 1 if the data matched, 0 otherwise. If the first character of the pattern is a colon (":"), the pattern is assumed to be a reference to a saved pattern. If the subsequent characters of Pattern are all numeric, they are taken to represent an object ID; otherwise, it is assumed they refer to a saved pattern's Name property.
Retrieves the next match for the data specified in a previous call toMatch . Updates theMatches andNamedMatches properties; returns 0 if no further match was found, or 1 + the number of substring matches (if any) otherwise. If an error occurred during matching, theErrorNumber andErrorMessage properties are set.
Tests whether the supplied pattern matches the supplied data. Returns the offset in the supplied string of the first match, or 0 if no match was found or a pattern error occurred. If Offset is specified, the search will start from that (1-based) offset in the supplied data.
|