v2026.6.4
All Bundles
Bundle Regular expression matching and replacement. RegEx compiles a pattern once and supports full match, substring search, capture groups, and global replacement. Included in lang.obl.

Result

RegEx result

Operations

GetLength #

Gets the string length of the match

method : public : GetLength() ~ Int

Return

TypeDescription
Intstring length of the match

Example

re := RegEx->New("\\w+");
r := re->FindFirst("hello world");
if(r <> Nil) {
  Console->PrintLine(r->GetLength());
};

GetStart #

Gets the starting index of match

method : public : GetStart() ~ Int

Return

TypeDescription
Intstarting index of match

Example

re := RegEx->New("\\d+");
r := re->FindFirst("price: 99 dollars");
if(r <> Nil) {
  Console->PrintLine(r->GetStart());
};

GetValue #

Gets the string value

method : public : GetValue() ~ String

Return

TypeDescription
Stringstring value

Example

re := RegEx->New("[A-Z][a-z]+");
r := re->FindFirst("The Quick Brown Fox");
if(r <> Nil) {
  r->GetValue()->PrintLine();
};

ToString #

Gets the string representation

method : public : ToString() ~ String

Return

TypeDescription
Stringstring representation

Example

re := RegEx->New("\\d+");
results := re->Find("a1 b22 c333")<Result>;
each(r := results) {
  r->ToString()->PrintLine();
};