#include <WOKNT_RegExp.hxx>
Public Member Functions | |
Standard_EXPORT | WOKNT_RegExp () |
creates a class instance | |
Standard_EXPORT | WOKNT_RegExp (const Handle(TCollection_HAsciiString)&aPattern, const WOKNT_RESyntax aSyntax=WOKNT_RESyntaxAWK, const Standard_Address aTransTbl=NULL, const Standard_Integer aTblLen=0) |
creates a class instance with given pattern that denotes a set of strings. Defines a translation table <atranstbl> and its length <atbllen> to perform character translation. Supply NULL for <atranstbl> and zero value for <atbllen> if no translation necessary. It is possible to set syntax of the regular expression by meaning <asyntax> parameter. Warning: raises if syntax of the regular expression given is incorrect | |
Standard_EXPORT void | Destroy () |
destroys all resources attached to the class instanse | |
~WOKNT_RegExp () | |
Standard_EXPORT void | SetPattern (const Handle(TCollection_HAsciiString)&aPattern, const WOKNT_RESyntax aSyntax=WOKNT_RESyntaxAWK, const Standard_Address aTransTbl=NULL, const Standard_Integer aTblLen=0) |
sets a new match pattern and possibly a new pattern syntax Warning: raises if the syntax given is incorrect | |
Standard_EXPORT Standard_Integer | Search (const Handle(TCollection_HAsciiString)&aString, const Standard_Integer aStartPos=1) const |
searches a sub-string in the <astring> which matches the specified pattern starting at index <astartpos>. Returns an index of the match position on success. Returns -1 if no match was found. Returns -2 if error was occur. Warning: raises if no search pattern was set | |
Standard_EXPORT Standard_Integer | Match (const Handle(TCollection_HAsciiString)&aString, const Standard_Integer aStartPos=1, const Standard_Integer aStopPos=1) const |
match the pattern given against the string <astring> starting at index <astartpos>. Do not consider matching past the position <astoppos>. Returns the length of the string matched on success. Returns -1 if no match was found. Returns -2 if error was occur. Warning: raises if no search pattern was set | |
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const |
Private Attributes | |
Standard_Address | myBuffer |
Standard_Boolean | myAlloc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|