PCRE

PCRE

Constructors

this
this()

Constructor. Initializes the re-usable exception.

Members

Classes

CompiledRegex
class CompiledRegex

Compiled regex class. Enables a regex pattern to be compiled once and used for multiple searches.

PcreException
class PcreException

Represents a PCRE Exception. The class is re-usable exception where the error message can be reset and the same instance can be re-thrown.

Functions

preg_match
bool preg_match(cstring subject, cstring pattern, bool case_sens)

Perform a regular expression match. Note that this method internally allocates and then frees a C pcre object each time it is called. If you want to run the same regex search multiple times on different input, you are probably better off using the compile() method, above.

Static variables

DEFAULT_COMPLEXITY_LIMIT
int DEFAULT_COMPLEXITY_LIMIT;

Limits the complexity of regex searches. If a regex search passes the specified complexity limit without either finding a match or determining that no match exists, it bails out, throwing an exception (see CompiledRegex.match()).

Variables

complexity_limit
int complexity_limit;
Undocumented in source.

Meta