logo

final class

sys::RegexMatcher

sys::Obj
  sys::RegexMatcher

RegexMatcher is used to matching operations on a regular expression.

Slots

end

Int end(Int group := 0)

Return end index+1 one of the given group. Throw exception if failed to match input or group index is invalid.

Source

find

Bool find()

Attempt to find the next match . If a match is made then return true - additional info is available via the group, start, and end methods. Return false if a match cannot be made.

Source

group

Str group(Int group := 0)

Return the substring captured by the matching operation. Group index zero denotes the entire pattern and capturing groups are indexed from left to right starting at one. Throw exception if failed to match input or group index is invalid.

Source

groupCount

Int groupCount()

Return the number of capturing groups or zero if no match. Group zero is is not included.

Source

matches

Bool matches()

Match the entire region against the pattern. If a match is made then return true - additional info is available via the group, start, and end methods. Return false if a match cannot be made.

Source

start

Int start(Int group := 0)

Return the start index of the given group. Throw exception if failed to match input or group index is invalid.

Source