RegExp
package js.lib
Available on js
Native JavaScript regular expressions.
For cross-platform regular expressions, use Haxe EReg
class or regexp literals.
See also:
Constructor
new(pattern:String, ?flags:String)
Create a regular expression object for matching text with a pattern.
Variables
read onlyglobal:Bool
Indicates whether or not the "g" flag is used with the regular expression.
read onlyignoreCase:Bool
Indicates whether or not the "i" flag is used with the regular expression.
lastIndex:Int
The index at which to start the next match.
read onlymultiline:Bool
Indicates whether or not the "m" flag is used with the regular expression.
read onlysource:String
The source text of the regexp object, it doesn't contain the two forward slashes on both sides and any flags.
Methods
exec(str:String):Null<RegExpMatch>
Execute a search for a match in a specified string. Returns a result array, or null.
test(str:String):Bool
Execute a search for a match between a regular expression and a specified string. Returns true or false.
toString():String
Return a string representing the regular expression.
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/lib/RegExp.html