From 06bc06d023186d8d36f90c88e76a9e4c03446534 Mon Sep 17 00:00:00 2001 From: alattalatta Date: Thu, 16 Dec 2021 02:01:24 +0900 Subject: Remove notranslate from JS guides --- .../guide/regular_expressions/assertions/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'files/ko/web/javascript/guide/regular_expressions/assertions/index.html') 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 6a7cd8b8f1..329b51d884 100644 --- a/files/ko/web/javascript/guide/regular_expressions/assertions/index.html +++ b/files/ko/web/javascript/guide/regular_expressions/assertions/index.html @@ -110,7 +110,7 @@ original_slug: Web/JavaScript/Guide/정규식/Assertions

General boundary-type overview example

-
// Using Regex boundaries to fix buggy string.
+
// Using Regex boundaries to fix buggy string.
 buggyMultiline = `tey, ihe light-greon apple
 tangs on ihe greon traa`;
 
@@ -135,7 +135,7 @@ console.log(4, fixedMultiline); // fix  'greon' but does not touch 'on'.
 
 

입력 시작시 일치를 위해 ^를 사용하십시오. 이 예에서는 /^A/ regex로 'A'로 시작하는 결과를 얻습니다. 여기서 ^는 한 가지 역할 만합니다. 적절한 결과를 보기위해 화살표 함수가있는 필터 메소드를 사용합니다.

-
let fruits = ["Apple", "Watermelon", "Orange", "Avocado", "Strawberry"];
+
let fruits = ["Apple", "Watermelon", "Orange", "Avocado", "Strawberry"];
 
 // Select fruits started with 'A' by /^A/ Regex.
 // Here '^' control symbol used only in one role: Matching begining of an input.
@@ -146,7 +146,7 @@ console.log(fruitsStartsWithA); // [ 'Apple', 'Avocado' ]
 
 

두 번째 예제에서 ^는 두 가지 모두에 사용됩니다 : 입력의 일치 시작점, 그룹에서 사용될 때 부정 또는 보완 문자 세트.

-
let fruits = ["Apple", "Watermelon", "Orange", "Avocado", "Strawberry"];
+
let fruits = ["Apple", "Watermelon", "Orange", "Avocado", "Strawberry"];
 
 // Selecting fruits that dose not start by 'A' by a /^[^A]/ regex.
 // In this example, two meanings of '^' control symbol are represented:
@@ -160,7 +160,7 @@ console.log(fruitsStartsWithNotA); // [ 'Watermelon', 'Orange', 'Strawberry' ]Matching a word boundary
 
-
let fruitsWithDescription = ["Red apple", "Orange orange", "Green Avocado"];
+
let fruitsWithDescription = ["Red apple", "Orange orange", "Green Avocado"];
 
 // Select descriptions that contains 'en' or 'ed' words endings:
 let enEdSelection = fruitsWithDescription.filter(descr => /(en|ed)\b/.test(descr));
@@ -169,7 +169,7 @@ console.log(enEdSelection); // [ 'Red apple', 'Green Avocado' ]

Lookahead assertion

-
// JS Lookahead assertion x(?=y)
+
// JS Lookahead assertion x(?=y)
 
 let regex = /First(?= test)/g;
 
@@ -183,14 +183,14 @@ console.log('This is a First peach in a month.'.match(regex)); // null
 
 

For example, /\d+(?!\.)/ matches a number only if it is not followed by a decimal point. /\d+(?!\.)/.exec('3.141') matches "141" but not "3.

-
console.log(/\d+(?!\.)/g.exec('3.141')); // [ '141', index: 2, input: '3.141' ]
+
console.log(/\d+(?!\.)/g.exec('3.141')); // [ '141', index: 2, input: '3.141' ]
 

Different meaning of '?!' combination usage in Assertions and  Ranges 

Different meaning of ?! combination usage in Assertions /x(?!y)/ and Ranges [^?!].

-
let orangeNotLemon = "Do you want to have an orange? Yes, I do not want to have a lemon!";
+
let orangeNotLemon = "Do you want to have an orange? Yes, I do not want to have a lemon!";
 
 // Different meaning of '?!' combination usage in Assertions /x(?!y)/ and  Ranges /[^?!]/
 let selectNotLemonRegex = /[^?!]+have(?! a lemon)[^?!]+[?!]/gi
@@ -202,7 +202,7 @@ console.log(orangeNotLemon.match(selectNotOrangeRegex)); // [ ' Yes, I do not wa
 
 

Lookbehind assertion

-
let oranges = ['ripe orange A ', 'green orange B', 'ripe orange C',];
+
let oranges = ['ripe orange A ', 'green orange B', 'ripe orange C',];
 
 let ripe_oranges = oranges.filter( fruit => fruit.match(/(?<=ripe )orange/));
 console.log(ripe_oranges); // [ 'ripe orange A ', 'ripe orange C' ]
-- 
cgit v1.2.3-54-g00ecf