Regexp

This class represents a regular expression, with which you can perform matches against various strings and retrieve submatches (those parts of the subject string that match parenthesized expressions.) For example, given the regular expression

brown (\\S+)

and subject string

The quick brown fox slyly jumped over the lazy dog

your Regexp object's Text property would be

brown fox

and its Submatches[1].Text property would be

fox

This is just a simple example of what regular expressions can do for you when parsing textual input; they are a very powerful tool. For example, the following regular expression will extract valid email addresses for you:

(?i)\\b[a-z0-9._%\\-]+@[a-z0-9._%\\-]+\\.[A-Z]{2,4}\\b

For more information see the PCRE Pattern Man Page.

This class is creatable.

DIM hRegexp AS Regexp

hRegexp = NEW Regexp ( Subject AS String, Pattern AS String [ , CompileOptions AS Integer, ExecOptions AS Integer ] )

Creates a new Regexp object, compiles a regular expression and matches it against some subject text.


Properties  Constants 
Offset  SubMatches  Text    Anchored  Caseless  DollarEndOnly  DotAll  ErrBadMagic  ErrBadOption  ErrBadUTF8  ErrBadUTF8Offset  ErrCallout  ErrMatchLimit  ErrNoMatch  ErrNoMemory  ErrNoSubstring  ErrNull  ErrUnknownNode  Extended  Extra  MultiLine  NoAutoCapture  NoUTF8Check  NotBOL  NotEOL  NotEmpty  UTF8  Ungreedy