# WOK
TKWOK
WOKUnix

# WOKUnix_RegExp Class Reference

provides regular expression matching and searching

`#include <WOKUnix_RegExp.hxx>`

## Public Member Functions

Standard_EXPORT | WOKUnix_RegExp ()
| creates a class instance
Standard_EXPORT | WOKUnix_RegExp (const Handle(TCollection_HAsciiString)&aPattern, const WOKUnix_RESyntax aSyntax=WOKUnix_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
| ~WOKUnix_RegExp ()
Standard_EXPORT void | SetPattern (const Handle(TCollection_HAsciiString)&aPattern, const WOKUnix_RESyntax aSyntax=WOKUnix_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

## Constructor & Destructor Documentation

Standard_EXPORT WOKUnix_RegExp::WOKUnix_RegExp | ( |  | ) |

Standard_EXPORT WOKUnix_RegExp::WOKUnix_RegExp | ( | const Handle(TCollection_HAsciiString)& | aPattern,
|  | const WOKUnix_RESyntax | aSyntax = `WOKUnix_RESyntaxAWK`,
|  | const Standard_Address | aTransTbl = `NULL`,
|  | const Standard_Integer | aTblLen = `0`
| ) |

WOKUnix_RegExp::~WOKUnix_RegExp | ( |  | ) | `[inline]`

## Member Function Documentation

Standard_EXPORT void WOKUnix_RegExp::Destroy | ( |  | ) |

Standard_EXPORT const WOKUnix_RegExp::Handle | ( | Standard_Type |  | ) | const

Standard_EXPORT Standard_Integer WOKUnix_RegExp::Match | ( | const Handle(TCollection_HAsciiString)& | aString,
|  | const Standard_Integer | aStartPos = `1`,
|  | const Standard_Integer | aStopPos = `1`
| ) | const

Standard_EXPORT Standard_Integer WOKUnix_RegExp::Search | ( | const Handle(TCollection_HAsciiString)& | aString,
|  | const Standard_Integer | aStartPos = `1`
| ) | const

Standard_EXPORT void WOKUnix_RegExp::SetPattern | ( | const Handle(TCollection_HAsciiString)& | aPattern,
|  | const WOKUnix_RESyntax | aSyntax = `WOKUnix_RESyntaxAWK`,
|  | const Standard_Address | aTransTbl = `NULL`,
|  | const Standard_Integer | aTblLen = `0`
| ) |

## Field Documentation

Standard_Boolean WOKUnix_RegExp::myAlloc `[private]`

Standard_Address WOKUnix_RegExp::myBuffer `[private]`

The documentation for this class was generated from the following file:

- WOKUnix_RegExp.hxx