Struct RegExp
#[repr(transparent)]
pub struct RegExp { /* private fields */ }
Implementations
impl RegExp
fn exec(&self, text: &str) -> Option<Array<JsString>>The
exec()method executes a search for a match in a specified string. Returns a result array, or null.
impl RegExp
fn ignore_case(&self) -> boolThe ignoreCase property indicates whether or not the "i" flag is used with the regular expression. ignoreCase is a read-only property of an individual regular expression instance.
impl RegExp
fn set_last_index(&self, index: u32)The lastIndex is a read/write integer property of regular expression instances that specifies the index at which to start the next match.
impl RegExp
fn left_context() -> JsStringThe non-standard leftContext property is a static and read-only property of regular expressions that contains the substring preceding the most recent match. `RegExp.$`` is an alias for this property.
impl RegExp
fn n2() -> JsString
impl RegExp
fn n5() -> JsString
impl RegExp
fn n8() -> JsString
impl RegExp
fn new_regexp(pattern: &RegExp, flags: &str) -> RegExp
impl RegExp
fn sticky(&self) -> boolThe sticky property reflects whether or not the search is sticky (searches in strings only from the index indicated by the lastIndex property of this regular expression). sticky is a read-only property of an individual regular expression object.
impl RegExp
fn unicode(&self) -> boolThe unicode property indicates whether or not the "u" flag is used with a regular expression. unicode is a read-only property of an individual regular expression instance.
impl RegExp
fn flags(&self) -> JsStringThe flags property returns a string consisting of the flags of the current regular expression object.
impl RegExp
fn input() -> JsStringThe non-standard input property is a static property of regular expressions that contains the string against which a regular expression is matched. RegExp.$_ is an alias for this property.
impl RegExp
fn last_match() -> JsStringThe non-standard lastMatch property is a static and read-only property of regular expressions that contains the last matched characters.
RegExp.$&is an alias for this property.
impl RegExp
fn multiline(&self) -> boolThe multiline property indicates whether or not the "m" flag is used with the regular expression. multiline is a read-only property of an individual regular expression instance.
impl RegExp
fn n3() -> JsString
impl RegExp
fn n6() -> JsString
impl RegExp
fn n9() -> JsString
impl RegExp
fn right_context() -> JsStringThe non-standard rightContext property is a static and read-only property of regular expressions that contains the substring following the most recent match.
RegExp.$'is an alias for this property.
impl RegExp
fn test(&self, text: &str) -> boolThe
test()method executes a search for a match between a regular expression and a specified string. Returns true or false.
impl RegExp
fn global(&self) -> boolThe global property indicates whether or not the "g" flag is used with the regular expression. global is a read-only property of an individual regular expression instance.
impl RegExp
fn last_index(&self) -> u32The lastIndex is a read/write integer property of regular expression instances that specifies the index at which to start the next match.
impl RegExp
fn last_paren() -> JsStringThe non-standard lastParen property is a static and read-only property of regular expressions that contains the last parenthesized substring match, if any.
RegExp.$+is an alias for this property.
impl RegExp
fn n1() -> JsStringThe non-standard $1, $2, $3, $4, $5, $6, $7, $8, $9 properties are static and read-only properties of regular expressions that contain parenthesized substring matches.
impl RegExp
fn n4() -> JsString
impl RegExp
fn n7() -> JsString
impl RegExp
fn new(pattern: &str, flags: &str) -> RegExpThe
RegExpconstructor creates a regular expression object for matching text with a pattern.
impl RegExp
fn source(&self) -> JsStringThe source property returns a String containing the source text of the regexp object, and it doesn't contain the two forward slashes on both sides and any flags.
impl RegExp
fn to_string(&self) -> JsStringThe
toString()method returns a string representing the regular expression.
Trait Implementations
impl AsRef<JsValue> for RegExp
fn as_ref(&self) -> &JsValue
impl AsRef<Object> for RegExp
fn as_ref(&self) -> &Object
impl AsRef<RegExp> for RegExp
fn as_ref(&self) -> &RegExp
impl Clone for RegExp
fn clone(&self) -> Self
impl Debug for RegExp
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Deref for RegExp
type Target = Object;fn deref(&self) -> &Object
impl Eq for RegExp
impl ErasableGeneric for RegExp
type Repr = JsValue;
impl From<JsValue> for RegExp
fn from(obj: JsValue) -> Self
impl FromWasmAbi for RegExp
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl IntoJsGeneric for RegExp
where
RegExp: JsGeneric,
type JsCanon = RegExp;fn to_js(self) -> RegExp
impl IntoWasmAbi for RegExp
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl JsCast for RegExp
fn instanceof(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self
impl LongRefFromWasmAbi for RegExp
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = RegExp;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl OptionFromWasmAbi for RegExp
fn is_none(abi: &Self::Abi) -> bool
impl OptionIntoWasmAbi for RegExp
fn none() -> Self::Abi
impl PartialEq for RegExp
fn eq(&self, other: &Self) -> bool
impl Promising for RegExp
type Resolution = RegExp;
impl RefFromWasmAbi for RegExp
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<RegExp>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl StructuralPartialEq for RegExp
impl UpcastFrom<RegExp> for RegExp
impl WasmDescribe for RegExp
fn describe()