text/Regexp

cover Pcre
from:pcre*
method compile(...)Pcre
method free
method exec(...)Int
method getStringNumber(...)Int
cover RegexpOption
class Regexp
extends:Object
static method compile~withOptions(pattern: String, options: Int)Regexp

Compile a regular expression pattern.

Parameters:
  • pattern – regular expression pattern to compile
  • options – compiling options.
Returns:

new regular expression object if successful, null if error occured.

static method compile(pattern: String)Regexp
static method new(pcre: Pcre)Regexp
method init(pcre: Pcre)
method matches~withLengthAndStart(subject: String, start: Int, length: SizeT)Match

If one or more characters from the start of the subject string matches the pattern, returns a Match object. Returns null if match fails.

Parameters:
  • subject – subject string to test for match
  • start – offset within subject at which to start matching
Returns:

Match object if a match was found, otherwise null

method matches(subject: String)Match
errorMsgString
errorOffsetInt
pcrePcre
maxSubstringsInt
class Match
extends:Iterable<T>
static method new(regexp: Regexp, groupCount: Int, subject: String, ovector: Int *)Match
method init(regexp: Regexp, groupCount: Int, subject: String, ovector: Int *)
method start~byIndex(index: Int)Int
Returns the starting position of the match group by index.
method end~byIndex(index: Int)Int
Returns the ending position of the match group by index.
method group~byIndex(index: Int)String
Returns a subgroup of the matched string by index.
method group~byName(name: String)String
Returns a subgroup of the matched string by name.
method iteratorIterator<T>
regexpRegexp
groupCountInt
subjectString
ovectorInt *
class MatchGroupIterator<T>
extends:Iterator<T>
static method new(matchObject: Match)MatchGroupIterator<T>
method init(matchObject: Match)
method hasNextBool
method next → T
method hasPrevBool
method prev → T
method removeBool
matchObjectMatch
indexInt

This Page