diff options
Diffstat (limited to 'files/ko/web/javascript/guide/regular_expressions/assertions/index.html')
-rw-r--r-- | files/ko/web/javascript/guide/regular_expressions/assertions/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/files/ko/web/javascript/guide/regular_expressions/assertions/index.html b/files/ko/web/javascript/guide/regular_expressions/assertions/index.html index 329b51d884..e84cfd4153 100644 --- a/files/ko/web/javascript/guide/regular_expressions/assertions/index.html +++ b/files/ko/web/javascript/guide/regular_expressions/assertions/index.html @@ -88,19 +88,19 @@ original_slug: Web/JavaScript/Guide/정규식/Assertions <tr> <td><code>x(?!y)</code></td> <td> - <p><strong>Negative lookahead assertion: </strong>Matches "x" only if "x"<span> is not followed by </span>"y"<span>.</span> For example, <code>/\d+(?!\.)/</code><span> matches a number only if it is not followed by a decimal point. </span><code>/\d+(?!\.)/.exec('3.141')</code> matches "141" but not "3.</p> + <p><strong>Negative lookahead assertion: </strong>Matches "x" only if "x" is not followed by "y". For example, <code>/\d+(?!\.)/</code> matches a number only if it is not followed by a decimal point. <code>/\d+(?!\.)/.exec('3.141')</code> matches "141" but not "3.</p> </td> </tr> <tr> <td><code>(?<=y)x</code></td> <td> - <p><strong>Lookbehind assertion: </strong>Matches "x" only if "x" is preceded by "y". For example, <code>/(?<=Jack)Sprat/</code><span> matches "Sprat" only if it is preceded by "Jack". </span><code>/(?<=Jack|Tom)Sprat/</code> matches "Sprat" only if it is preceded by "Jack" or "Tom". However, neither "Jack" nor "Tom" is part of the match results.</p> + <p><strong>Lookbehind assertion: </strong>Matches "x" only if "x" is preceded by "y". For example, <code>/(?<=Jack)Sprat/</code> matches "Sprat" only if it is preceded by "Jack". <code>/(?<=Jack|Tom)Sprat/</code> matches "Sprat" only if it is preceded by "Jack" or "Tom". However, neither "Jack" nor "Tom" is part of the match results.</p> </td> </tr> <tr> <td><code>(?<!y)x</code></td> <td> - <p><strong>Negative lookbehind assertion: </strong>Matches "x" only if "x" is not preceded by "y". For example, <code>/(?<!-)\d+/</code><span> matches a number only if it is not preceded by a minus sign. </span><code>/(?<!-)\d+/.exec('3')</code> matches "3". <code>/(?<!-)\d+/.exec('-3')</code> match is not found because the number is preceded by the minus sign.</p> + <p><strong>Negative lookbehind assertion: </strong>Matches "x" only if "x" is not preceded by "y". For example, <code>/(?<!-)\d+/</code> matches a number only if it is not preceded by a minus sign. <code>/(?<!-)\d+/.exec('3')</code> matches "3". <code>/(?<!-)\d+/.exec('-3')</code> match is not found because the number is preceded by the minus sign.</p> </td> </tr> </tbody> @@ -181,7 +181,7 @@ console.log('This is a First peach in a month.'.match(regex)); // null <h3 id="Basic_negative_lookahead_assertion">Basic negative lookahead assertion</h3> -<p>For example, <code>/\d+(?!\.)/</code><span> matches a number only if it is not followed by a decimal point. </span><code>/\d+(?!\.)/.exec('3.141')</code> matches "141" but not "3.</p> +<p>For example, <code>/\d+(?!\.)/</code> matches a number only if it is not followed by a decimal point. <code>/\d+(?!\.)/.exec('3.141')</code> matches "141" but not "3.</p> <pre class="brush: js">console.log(/\d+(?!\.)/g.exec('3.141')); // [ '141', index: 2, input: '3.141' ] </pre> |