ScriptRegExp

Class that encapsulates regular expressions. The D struct Regex cannot be directly stored in a ScriptObject

Constructors

this
this(string pattern, string flags)

ctor

Members

Functions

dotAll
bool dotAll()

whether or not 's' flag was used

exec
string[] exec(string str)

exec

flags
string flags()

flags property

global
bool global()

whether or not 'g' flag was used

ignoreCase
bool ignoreCase()

whether or not 'i' flag was used

lastIndex
size_t lastIndex()

last index property

lastIndex
size_t lastIndex(size_t li)

last index property

match
auto match(string str)

returns match

matchAll
auto matchAll(string str)

matchAll - The Script will implement this as an iterator once generators are a thing

multiline
bool multiline()

whether or not 'm' flag was used

replace
auto replace(string str, string fmt)

replace

replaceFirst
auto replaceFirst(string str, string fmt)

replace only the first occurrence.

search
auto search(string str)

search

source
string source()

source property

split
auto split(string str)

split

test
bool test(string str)

test

toString
string toString()

get the string representation

Meta