RegExp
Native JavaScript regular expressions.
For cross-platform regular expressions, use Haxe EReg class or
regexp literals.
Instance Members
global: BoolIndicates whether or not the "g" flag is used with the regular expression.
ignoreCase: BoolIndicates whether or not the "i" flag is used with the regular expression.
multiline: BoolIndicates whether or not the "m" flag is used with the regular expression.
source: StringThe source text of the regexp object, it doesn't contain the two forward slashes on both sides and any flags.
lastIndex: IntThe index at which to start the next match.
exec(str: String): Null<RegExpMatch>Execute a search for a match in a specified string. Returns a result array, or null.
| Name | Type |
|---|---|
str |
String |
| Returns |
|---|
| Null<RegExpMatch> |
Execute a search for a match between a regular expression and a specified string. Returns true or false.
| Name | Type |
|---|---|
str |
String |
| Returns |
|---|
| Bool |
toString(): StringReturn a string representing the regular expression.
| Returns |
|---|
| String |
Create a regular expression object for matching text with a pattern.
| Name | Type | Default |
|---|---|---|
pattern |
String | |
flags |
String | (optional) |