RegExp (Constructor) Summary Constructs a System.RegExp object with the specified regular expression pattern and flags. Signatures Click on a signature to select it and view its documentation. public RegExp() public RegExp(external initialValue) public RegExp(external initialValue, string flags) public RegExp(external initialValue, char[] flags) public RegExp(System.RegExp initialValue) public RegExp(System.RegExp initialValue, string flags) public RegExp(System.RegExp initialValue, char[] flags) public RegExp(string initialValue) public RegExp(string initialValue, string flags) public RegExp(string initialValue, char[] flags) Usage public RegExp() public RegExp(external initialValue) public RegExp(external initialValue, string flags) public RegExp(external initialValue, char[] flags) public RegExp(System.RegExp initialValue) public RegExp(System.RegExp initialValue, string flags) public RegExp(System.RegExp initialValue, char[] flags) public RegExp(string initialValue) public RegExp(string initialValue, string flags) public RegExp(string initialValue, char[] flags) Parameters initialValue The regular expression pattern to initialize the System.RegExp object to. Parameters initialValue The regular expression pattern to initialize the System.RegExp object to. flags The flags to apply to the regular expression. Valid flags are g, m, or i. Parameters initialValue The regular expression pattern to initialize the System.RegExp object to. flags The flags to apply to the regular expression. Valid flags are g, m, or i. Parameters initialValue The regular expression pattern to initialize the System.RegExp object to. Parameters initialValue The regular expression pattern to initialize the System.RegExp object to. flags The flags to apply to the regular expression. Valid flags are g, m, or i. Parameters initialValue The regular expression pattern to initialize the System.RegExp object to. flags The flags to apply to the regular expression. Valid flags are g, m, or i. Parameters initialValue The regular expression pattern to initialize the System.RegExp object to. Parameters initialValue The regular expression pattern to initialize the System.RegExp object to. flags The flags to apply to the regular expression. Valid flags are g, m, or i. Parameters initialValue The regular expression pattern to initialize the System.RegExp object to. flags The flags to apply to the regular expression. Valid flags are g, m, or i. Description Constructs a System.RegExp object with a default value of /(?:)/. Constructs a System.RegExp object with the specified regular expression pattern. Constructs a System.RegExp object with the specified regular expression pattern and flags. Valid flags are g (global match), m (multi-line match), and i (case-insensitive match). Constructs a System.RegExp object with the specified regular expression pattern and flags. Valid flags are g (global match), m (multi-line match), and i (case-insensitive match). Constructs a System.RegExp object with the specified regular expression pattern. Constructs a System.RegExp object with the specified regular expression pattern and flags. Valid flags are g (global match), m (multi-line match), and i (case-insensitive match). Constructs a System.RegExp object with the specified regular expression pattern and flags. Valid flags are g (global match), m (multi-line match), and i (case-insensitive match). Constructs a System.RegExp object with the specified regular expression pattern. Constructs a System.RegExp object with the specified regular expression pattern and flags. Valid flags are g (global match), m (multi-line match), and i (case-insensitive match). Constructs a System.RegExp object with the specified regular expression pattern and flags. Valid flags are g (global match), m (multi-line match), and i (case-insensitive match). Examples Basic Usage 123import System; Console.log(new RegExp()); Basic Usage 123import System; Console.log(new RegExp(/.+/)); Basic Usage 1234import System; Console.log(new RegExp(/.+/, "g"));Console.log(new RegExp(/.+/, "gmi")); Basic Usage 1234import System; Console.log(new RegExp(/.+/, [`g`]));Console.log(new RegExp(/.+/, [`g`, `m`, `i`])); Basic Usage 123import System; Console.log(new RegExp(/.+/)); Basic Usage 1234import System; Console.log(new RegExp(/.+/, "g"));Console.log(new RegExp(/.+/, "gmi")); Basic Usage 1234import System; Console.log(new RegExp(/.+/, [`g`]));Console.log(new RegExp(/.+/, [`g`, `m`, `i`])); Basic Usage 123import System; Console.log(new RegExp(".+")); Constructing regular expressions with variables 1234import System; string test = "test";Console.log(new RegExp(test + "*")); Basic Usage 1234import System; Console.log(new RegExp(".+", "g"));Console.log(new RegExp(".+", "gmi")); Constructing regular expressions with variables 1234import System; string test = "test";Console.log(new RegExp(test + "*", "g")); Basic Usage 1234import System; Console.log(new RegExp(".+", [`g`]));Console.log(new RegExp(".+", [`g`, `m`, `i`])); Constructing regular expressions with variables 1234import System; string test = "test";Console.log(new RegExp(test + "*", [`g`])); Share HTML | BBCode | Direct Link