From 310fd066e91f454b990372ffa30e803cc8120975 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:56:40 +0100 Subject: unslug zh-cn: move --- .../global_objects/regexp/prototype/index.html | 153 --------------------- 1 file changed, 153 deletions(-) delete mode 100644 files/zh-cn/web/javascript/reference/global_objects/regexp/prototype/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/regexp') diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/prototype/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/prototype/index.html deleted file mode 100644 index 0c76cb77ac..0000000000 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/prototype/index.html +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: RegExp.prototype -slug: Web/JavaScript/Reference/Global_Objects/RegExp/prototype -tags: - - JavaScript - - Property - - RegExp -translation_of: Web/JavaScript/Reference/Global_Objects/RegExp -translation_of_original: Web/JavaScript/Reference/Global_Objects/RegExp/prototype ---- -

{{JSRef("Global_Objects", "RegExp")}}

-

概述

-

RegExp.prototype 属性表示 {{jsxref("Global_Objects/RegExp", "RegExp")}} 构造函数的原型对象。

-

描述

-

查看 {{jsxref("Global_Objects/RegExp", "RegExp")}} 了解更多关于 RegExp 实例的说明。

-

RegExp 实例继承 RegExp.prototype。修改该原型对象上的属性或方法会影响到所有的 RegExp 实例。

-

属性

-

查看已废弃的RegExp属性

-

注意,RegExp 对象的几个属性既有完整的长属性名,也有对应的类 Perl 的短属性名。两个属性都有着同样的值。JavaScript 的正则语法就是基于 Perl 的。

-
-
- RegExp.prototype.constructor
-
- 创建该正则对象的构造函数。
-
- {{jsxref("RegExp.prototype.global")}}
-
- 是否开启全局匹配,也就是匹配目标字符串中所有可能的匹配项,而不是只进行第一次匹配。
-
- {{jsxref("RegExp.prototype.ignoreCase")}}
-
- 在匹配字符串时是否要忽略字符的大小写。
-
- {{jsxref("RegExp.prototype.lastIndex")}}
-
- 下次匹配开始的字符串索引位置。
-
- {{jsxref("RegExp.prototype.multiline")}}
-
- 是否开启多行模式匹配(影响 ^ 和 $ 的行为)。
-
- {{jsxref("RegExp.prototype.source")}}
-
- 正则对象的源模式文本。
-
- {{jsxref("RegExp.prototype.sticky")}} {{experimental_inline}}
-
- 是否开启粘滞匹配。
-
-
- {{ jsOverrides("Object", "properties", "constructor", "global", "ignoreCase", "lastIndex", "multiline", "source", "sticky") }}
-

方法

-

查看已废弃的RegExp方法

-
-
- {{jsxref("RegExp.prototype.exec()")}}
-
- 在目标字符串中执行一次正则匹配操作。
-
- {{jsxref("RegExp.prototype.test()")}}
-
- 测试当前正则是否能匹配目标字符串。
-
- {{jsxref("RegExp.prototype.toSource()")}} {{non-standard_inline}}
-
- 返回一个字符串,其值为该正则对象的字面量形式。覆盖了Object.prototype.toSource 方法.
-
- {{jsxref("RegExp.prototype.toString()")}}
-
- 返回一个字符串,其值为该正则对象的字面量形式。覆盖了{{jsxref("Object.prototype.toString()")}} 方法。
-
-
- {{ jsOverrides("Object", "Methods", "exec", "test", "toSource", "toString") }}
-

规范

- - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
ECMAScript 1st Edition. Implemented in JavaScript 1.1StandardInitial definition.
{{SpecName('ES5.1', '#sec-15.10.5.1', 'RegExp')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-regexp.prototype', 'RegExp.prototype')}}{{Spec2('ES6')}} 
-

浏览器兼容性

-

{{ CompatibilityTable() }}

-
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
-
-
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
-
-

相关链接

- -

 

-- cgit v1.2.3-54-g00ecf