RegExp
Native JavaScript regular expressions.
For cross-platform regular expressions, use Haxe EReg
class or
regexp literals.
Instance Members
global: Bool
Indicates whether or not the "g" flag is used with the regular expression.
ignoreCase: Bool
Indicates whether or not the "i" flag is used with the regular expression.
multiline: Bool
Indicates whether or not the "m" flag is used with the regular expression.
source: String
The source text of the regexp object, it doesn't contain the two forward slashes on both sides and any flags.
lastIndex: Int
The 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(): String
Return 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) |