From 4289bf1fbb823f410775b4c7d0533b7abd8e5f5f Mon Sep 17 00:00:00 2001 From: 3indblown Leaf <69508345+kraccoon-dev@users.noreply.github.com> Date: Tue, 1 Feb 2022 19:42:11 +0900 Subject: remove class 1 (#3922) --- .../javascript/reference/global_objects/regexp/exec/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'files/ko/web/javascript/reference/global_objects/regexp/exec') diff --git a/files/ko/web/javascript/reference/global_objects/regexp/exec/index.html b/files/ko/web/javascript/reference/global_objects/regexp/exec/index.html index d20573f473..eb02391603 100644 --- a/files/ko/web/javascript/reference/global_objects/regexp/exec/index.html +++ b/files/ko/web/javascript/reference/global_objects/regexp/exec/index.html @@ -26,7 +26,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/exec

구문

-
regexObj.exec(str)
+
regexObj.exec(str)

매개변수

@@ -45,7 +45,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/exec

다음과 같은 예제를 고려해보세요.

-
// Match "quick brown" followed by "jumps", ignoring characters in between
+
// Match "quick brown" followed by "jumps", ignoring characters in between
 // Remember "brown" and "jumps"
 // Ignore case
 let re = /quick\s(brown).+?(jumps)/ig;
@@ -131,7 +131,7 @@ let result = re.exec('The Quick Brown Fox Jumps Over The Lazy Dog');

If your regular expression uses the "g" flag, you can use the exec() method multiple times to find successive matches in the same string. When you do so, the search starts at the substring of str specified by the regular expression's {{jsxref("RegExp.lastIndex", "lastIndex")}} property ({{jsxref("RegExp.prototype.test()", "test()")}} will also advance the {{jsxref("RegExp.lastIndex", "lastIndex")}} property). For example, assume you have this script:

-
var myRe = /ab*/g;
+
var myRe = /ab*/g;
 var str = 'abbcdefabh';
 var myArray;
 while ((myArray = myRe.exec(str)) !== null) {
@@ -143,7 +143,7 @@ while ((myArray = myRe.exec(str)) !== null) {
 
 

This script displays the following text:

-
Found abb. Next match starts at 3
+
Found abb. Next match starts at 3
 Found ab. Next match starts at 9
 
@@ -153,7 +153,7 @@ Found ab. Next match starts at 9

You can also use exec() without creating a {{jsxref("RegExp")}} object:

-
var matches = /(hello \S+)/.exec('This is a hello world!');
+
var matches = /(hello \S+)/.exec('This is a hello world!');
 console.log(matches[1]);
 
-- cgit v1.2.3-54-g00ecf