From d44f5032d0f53256b2d5aef505d6b593fd3cd158 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:14:18 +0800 Subject: fix yari h2m dry run errors (zh-CN) --- .../global_objects/regexp/@@search/index.html | 50 +------------------- .../global_objects/regexp/@@species/index.html | 50 +------------------- .../global_objects/regexp/@@split/index.html | 50 +------------------- .../global_objects/regexp/compile/index.html | 50 +------------------- .../global_objects/regexp/exec/index.html | 12 ++--- .../global_objects/regexp/flags/index.html | 50 +------------------- .../global_objects/regexp/global/index.html | 51 ++------------------ .../global_objects/regexp/ignorecase/index.html | 51 ++------------------ .../reference/global_objects/regexp/index.html | 4 +- .../global_objects/regexp/input/index.html | 50 +------------------- .../global_objects/regexp/lastindex/index.html | 53 ++------------------- .../global_objects/regexp/lastmatch/index.html | 50 +------------------- .../global_objects/regexp/lastparen/index.html | 50 +------------------- .../global_objects/regexp/leftcontext/index.html | 50 +------------------- .../global_objects/regexp/multiline/index.html | 51 ++------------------ .../reference/global_objects/regexp/n/index.html | 54 ++-------------------- .../global_objects/regexp/regexp/index.html | 3 +- .../global_objects/regexp/rightcontext/index.html | 50 +------------------- .../global_objects/regexp/source/index.html | 52 +-------------------- .../global_objects/regexp/tostring/index.html | 51 ++------------------ .../global_objects/regexp/unicode/index.html | 52 +-------------------- 21 files changed, 47 insertions(+), 887 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/regexp') diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/@@search/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/@@search/index.html index 19a14cdf19..8dfb7513f7 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/@@search/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/@@search/index.html @@ -91,55 +91,7 @@ console.log(result); // 3

浏览器兼容性

-
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatUnknown}}{{CompatGeckoDesktop(49)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile(49)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
+{{Compat}}

另见

diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/@@species/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/@@species/index.html index a667841afb..aa8a496a11 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/@@species/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/@@species/index.html @@ -53,55 +53,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/@@species

浏览器兼容性

-
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatUnknown}}{{CompatGeckoDesktop("49")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("49")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
+{{Compat}}

另见

diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/@@split/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/@@split/index.html index 213f37b1e7..e60c9eaaaf 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/@@split/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/@@split/index.html @@ -89,55 +89,7 @@ console.log(result); // ["(2016)", "(01)", "(02)"]

浏览器兼容性

-
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatUnknown}}{{CompatGeckoDesktop(49)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile(49)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
+{{Compat}}

另见

diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/compile/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/compile/index.html index b46e92ef6b..1f622c4146 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/compile/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/compile/index.html @@ -74,55 +74,7 @@ regexObj.compile("new foo", "g");

浏览器兼容性

-
{{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}}
-
+{{Compat}}

相关链接

diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/exec/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/exec/index.html index 549dd3d494..172d75ef0f 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/exec/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/exec/index.html @@ -55,10 +55,10 @@ var result = re.exec('The Quick Brown Fox Jumps Over The Lazy Dog'); - - - - + + + + @@ -137,8 +137,8 @@ while ((myArray = myRe.exec(str)) !== null) { Found ab. Next match starts at 9 -
-

注意:不要把正则表达式字面量(或者{{jsxref("RegExp")}}构造器)放在 while 条件表达式里。由于每次迭代时 {{jsxref("RegExp.lastIndex", "lastIndex")}} 的属性都被重置,如果匹配,将会造成一个死循环。并且要确保使用了'g'标记来进行全局的匹配,否则同样会造成死循环。

+
+

警告:不要把正则表达式字面量(或者{{jsxref("RegExp")}}构造器)放在 while 条件表达式里。由于每次迭代时 {{jsxref("RegExp.lastIndex", "lastIndex")}} 的属性都被重置,如果匹配,将会造成一个死循环。并且要确保使用了'g'标记来进行全局的匹配,否则同样会造成死循环。

结合 RegExp 字面量使用 exec()

diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/flags/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/flags/index.html index e5ffd31071..a53c5b02e7 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/flags/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/flags/index.html @@ -57,55 +57,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/flags

浏览器兼容性

-
{{CompatibilityTable}}
- -
-
对象属性/索引描述例子对象属性/索引描述例子
result
- - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatGeckoDesktop("37")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
- - -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("37")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
+{{Compat}}

另见

diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/global/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/global/index.html index 95fbabc9d0..d22d0a6fd9 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/global/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/global/index.html @@ -49,54 +49,11 @@ console.log(regex.global) // true +

浏览器兼容性

-

{{ 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() }}
-
+ +{{Compat}} +

相关链接