RegEx packages

From Lazarus wiki
Revision as of 22:27, 18 December 2005 by Ik 5 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

regexpr is a very basic regex (Regular Expression) unit. The use of regex is to search patterns inside string.

The current unit is far from being complete, and still missing very simple syntax support of POSIX or more complex syntax such as Perl regex, Java Regex, Ruby Regex etc...

The unit contains for now 4 functions:

  • GenerateRegExprEngine – This function compiles the regex pattern.
  • RegExprPos – Finds the pattern inside a given string.
  • DestroyRegExprEngine – Free the compilation of the pattern
  • RegExprEscapeStr – Escape reserve syntax of regular expression language so it will be understood as string instead of regex syntax.