-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path9cd91cfb.c96643a4.js
1 lines (1 loc) · 69.2 KB
/
9cd91cfb.c96643a4.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{104:function(e,t,a){"use strict";a.d(t,"a",(function(){return p})),a.d(t,"b",(function(){return u}));var n=a(0),r=a.n(n);function c(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach((function(t){c(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function b(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},c=Object.keys(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),s=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=s(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,c=e.originalType,o=e.parentName,l=b(e,["components","mdxType","originalType","parentName"]),p=s(a),m=n,u=p["".concat(o,".").concat(m)]||p[m]||d[m]||c;return a?r.a.createElement(u,i(i({ref:t},l),{},{components:a})):r.a.createElement(u,i({ref:t},l))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=a.length,o=new Array(c);o[0]=m;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i.mdxType="string"==typeof e?e:n,o[1]=i;for(var l=2;l<c;l++)o[l]=a[l];return r.a.createElement.apply(null,o)}return r.a.createElement.apply(null,a)}m.displayName="MDXCreateElement"},105:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(a(106)),r=c(a(107));function c(e){return e&&e.__esModule?e:{default:e}}var o={Google:n.default,Baidu:r.default};t.default=o},106:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),r=o(a(0)),c=o(a(1));function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function t(){return i(this,t),b(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"componentDidMount",value:function(){window&&(window.adsbygoogle=window.adsbygoogle||[]).push({})}},{key:"render",value:function(){return r.default.createElement("ins",{className:this.props.className+" adsbygoogle",style:this.props.style,"data-ad-client":this.props.client,"data-ad-slot":this.props.slot,"data-ad-layout":this.props.layout,"data-ad-layout-key":this.props.layoutKey,"data-ad-format":this.props.format,"data-full-width-responsive":this.props.responsive})}}]),t}(r.default.Component);t.default=l,l.propTypes={className:c.default.string,style:c.default.object,client:c.default.string.isRequired,slot:c.default.string.isRequired,layout:c.default.string,layoutKey:c.default.string,format:c.default.string,responsive:c.default.string},l.defaultProps={className:"",style:{display:"block"},format:"auto",layout:"",layoutKey:"",responsive:"false"}},107:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),c=a(0),o=(n=c)&&n.__esModule?n:{default:n};function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function t(){return i(this,t),b(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){return o.default.createElement("div",{className:"adsbybaidu"},"TODO")}}]),t}(o.default.Component);t.default=l},110:function(e,t,a){"use strict";var n=a(0),r=a.n(n),c=a(21);t.a=function(){const e=Object(c.default)(),{siteConfig:t}=e;return r.a.useEffect((()=>{const e=document.getElementsByClassName(t.customFields.commentSelector);if(0===e.length)return;const a=document.createElement("script");a.setAttribute("src","https://utteranc.es/client.js"),a.setAttribute("repo",t.customFields.ghRepoUtterance),a.setAttribute("issue-term","title"),a.setAttribute("theme","boxy-light"),a.setAttribute("crossorigin","anonymous"),a.setAttribute("async",!0),e[0].insertAdjacentElement("afterend",a)}),[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:t.customFields.commentSelector}))}},111:function(e,t,a){"use strict";var n=a(0),r=a.n(n),c=a(21);const o=e=>Number(e)<10?"0"+e:e;t.a=function(e){const{created:t,modified:a}=e,n=new Date(t),i=new Date(a),b=Object(c.default)(),{siteConfig:{organizationName:l}}=b,s=`${n.getFullYear()}-${o(n.getMonth()+1)}-${o(n.getDate())}`,p=`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())}`;return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col text--right text--italic"},r.a.createElement("span",null,"Created on "),r.a.createElement("time",{itemProp:"datePublished",dateTime:n.toISOString(),className:"text--bold"},s),r.a.createElement("span",null," / Last updated on "),r.a.createElement("time",{itemProp:"dateModified",dateTime:i.toISOString(),className:"text--bold"},p))))}},88:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return s})),a.d(t,"metadata",(function(){return p})),a.d(t,"toc",(function(){return d})),a.d(t,"default",(function(){return u}));var n=a(3),r=a(7),c=(a(0),a(104)),o=a(105),i=a.n(o),b=a(110),l=a(111),s={title:"Javascript \uc815\uaddc\uc2dd \uae30\ucd08",sidebar_label:"Javascript \uc815\uaddc\uc2dd \uae30\ucd08",description:"Javascript \uc815\uaddc\uc2dd \uae30\ucd08",keywords:["javascript","\uc815\uaddc\uc2dd","\uc815\uaddc\uc2dd \uae30\ucd08"]},p={unversionedId:"javascript/regex",id:"javascript/regex",isDocsHomePage:!1,title:"Javascript \uc815\uaddc\uc2dd \uae30\ucd08",description:"Javascript \uc815\uaddc\uc2dd \uae30\ucd08",source:"@site/docs/javascript/regex.mdx",slug:"/javascript/regex",permalink:"/docs/javascript/regex",version:"current",sidebar_label:"Javascript \uc815\uaddc\uc2dd \uae30\ucd08",sidebar:"javascript"},d=[{value:"RegExp \uac1d\uccb4",id:"regexp-\uac1d\uccb4",children:[]},{value:"\uc815\uaddc\uc2dd\uc744 \uc0ac\uc6a9\ud558\ub294 \uba54\uc18c\ub4dc",id:"\uc815\uaddc\uc2dd\uc744-\uc0ac\uc6a9\ud558\ub294-\uba54\uc18c\ub4dc",children:[]},{value:"RegExp",id:"regexp",children:[{value:"\uac1d\uccb4 \uc0dd\uc131\ubc95",id:"\uac1d\uccb4-\uc0dd\uc131\ubc95",children:[]},{value:"lastIndex",id:"lastindex",children:[]},{value:"exec()",id:"exec",children:[]},{value:"test()",id:"test",children:[]}]},{value:"String",id:"string",children:[{value:"match()",id:"match",children:[]},{value:"replace()",id:"replace",children:[]},{value:"search()",id:"search",children:[]},{value:"split()",id:"split",children:[]},{value:"* \ud2b9\uc218\ubb38\uc790 \ubb38\uc790\uc5f4\uacfc split('') \uc0ac\uc6a9 \uc2dc \uc8fc\uc758",id:"-\ud2b9\uc218\ubb38\uc790-\ubb38\uc790\uc5f4\uacfc-split-\uc0ac\uc6a9-\uc2dc-\uc8fc\uc758",children:[]}]},{value:"\ubb38\uc790 \ud074\ub798\uc2a4",id:"\ubb38\uc790-\ud074\ub798\uc2a4",children:[]},{value:"Assertion",id:"assertion",children:[{value:"\ubc14\uc6b4\ub354\ub9ac \ud0c0\uc785 assertions(Boundary-type assertions)",id:"\ubc14\uc6b4\ub354\ub9ac-\ud0c0\uc785-assertionsboundary-type-assertions",children:[]},{value:"\uae30\ud0c0 assertions(Other assertions)",id:"\uae30\ud0c0-assertionsother-assertions",children:[]}]},{value:"\ud50c\ub798\uadf8",id:"\ud50c\ub798\uadf8",children:[{value:"g: \uae00\ub85c\ubc8c",id:"g-\uae00\ub85c\ubc8c",children:[]},{value:"i: \ub300\uc18c\ubb38\uc790 \uad6c\ubd84\uc5c6\uc74c",id:"i-\ub300\uc18c\ubb38\uc790-\uad6c\ubd84\uc5c6\uc74c",children:[]},{value:"u: \uc720\ub2c8\ucf54\ub4dc \ucde8\uae09",id:"u-\uc720\ub2c8\ucf54\ub4dc-\ucde8\uae09",children:[]}]},{value:"\uc815\uaddc\uc2dd \uc0ac\uc6a9 \uc608\uc81c",id:"\uc815\uaddc\uc2dd-\uc0ac\uc6a9-\uc608\uc81c",children:[{value:"\ud734\ub300\ud3f0\ubc88\ud638",id:"\ud734\ub300\ud3f0\ubc88\ud638",children:[]},{value:"\uad6d\ub0b4 \uc720\uc120 \uc804\ud654\ubc88\ud638",id:"\uad6d\ub0b4-\uc720\uc120-\uc804\ud654\ubc88\ud638",children:[]},{value:"\ud2b9\uc218\ubb38\uc790 \ubc1c\ub77c\ub0b4\uae30",id:"\ud2b9\uc218\ubb38\uc790-\ubc1c\ub77c\ub0b4\uae30",children:[]},{value:"\uae30\ubcf8\uc22b\uc790\ub97c "," \uac00 \ub4e4\uc5b4\uac04 \ud1b5\ud654\ud615\ud0dc\ub85c \ubc14\uafb8\uae30",id:"\uae30\ubcf8\uc22b\uc790\ub97c--\uac00-\ub4e4\uc5b4\uac04-\ud1b5\ud654\ud615\ud0dc\ub85c-\ubc14\uafb8\uae30",children:[]}]}],m={toc:d};function u(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(c.b)("wrapper",Object(n.a)({},m,a,{components:t,mdxType:"MDXLayout"}),Object(c.b)(l.a,{created:"2021/3/1",modified:"2021/3/1",mdxType:"PostingDate"}),Object(c.b)(i.a.Google,{client:"undefined",slot:"undefined",style:{display:"block"},format:"auto",responsive:"true"}),Object(c.b)("p",null,"\ubaa8\ub4e0 \uac83\uc744 \uc815\ub9ac\ud558\uc9c4 \uc54a\uc558\uc9c0\ub9cc \uc815\uaddc\uc2dd \uc4f8 \uc77c\uc774 \uc788\uc744 \ub54c\ub9c8\ub2e4 \ud55c\ubc88\ucbe4 \ubcfc \uc218 \uc788\ub3c4\ub85d \ub044\uc801\uc5ec \ubd24\ub2e4.."),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://regexr.com/"}),"https://regexr.com/")," \u2192 \uc815\uaddc\uc2dd \ud559\uc2b5 & \uc2e4\uc2dc\uac04 \ud655\uc778 \uac00\ub2a5\ud55c \uc0ac\uc774\ud2b8"),Object(c.b)("li",{parentName:"ul"},Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Guide/%EC%A0%95%EA%B7%9C%EC%8B%9D"}),"\uc815\uaddc \ud45c\ud604\uc2dd - JavaScript MDN \ubb38\uc11c"))),Object(c.b)("h2",{id:"regexp-\uac1d\uccb4"},"RegExp \uac1d\uccb4"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/RegExp"}),"JavaScript RegExp")," \uac1d\uccb4\ub294 global \ub610\ub294 sticky \ud50c\ub798\uadf8\ub97c \uc124\uc815(/foo/g, /foo/y \ub4f1)\ud55c \uacbd\uc6b0 \uc774\uc804 \uc77c\uce58\uc758 \uc778\ub371\uc2a4\ub97c \uc800\uc7a5\ud558\ubbc0\ub85c \uc0c1\ud0dc\ub97c \uac00\uc9c0\uace0(stateful) \uc788\uc2b5\ub2c8\ub2e4"),Object(c.b)("h2",{id:"\uc815\uaddc\uc2dd\uc744-\uc0ac\uc6a9\ud558\ub294-\uba54\uc18c\ub4dc"},"\uc815\uaddc\uc2dd\uc744 \uc0ac\uc6a9\ud558\ub294 \uba54\uc18c\ub4dc"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/RegExp"}),"RegExp")," \uac1d\uccb4: ",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec"}),"exec()"),", ",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test"}),"test()")),Object(c.b)("li",{parentName:"ul"},Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String"}),"String")," \uac1d\uccb4: ",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/match"}),"match()"),", ",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/replace"}),"replace()"),", ",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/search"}),"search()"),", ",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/split"}),"split()"))),Object(c.b)("h2",{id:"regexp"},"RegExp"),Object(c.b)("h3",{id:"\uac1d\uccb4-\uc0dd\uc131\ubc95"},"\uac1d\uccb4 \uc0dd\uc131\ubc95"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/RegExp"}),"MDN\ubb38\uc11c: \uac1d\uccb4 \uc0dd\uc131\ubc95")),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},"\ub9ac\ud130\ub7f4 \ud45c\uae30\ubc95"),Object(c.b)("li",{parentName:"ul"},"\uc0dd\uc131\uc790 \ud568\uc218")),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"// \uc544\ub798 \ubc29\ubc95 1,2,3\uc740 \ubaa8\ub450 \uac19\uc740 \ub0b4\uc6a9\uc774\ub2e4\n/* \ubc29\ubc95 1 */ var re = /ab+c/i;\n/* \ubc29\ubc95 2 */ var re = new RegExp(/ab+c/, 'i'); // \ub9ac\ud130\ub7f4\n/* \ubc29\ubc95 3 */ var re = new RegExp('ab+c', 'i'); // \uc0dd\uc131\uc790\n")),Object(c.b)("h3",{id:"lastindex"},"lastIndex"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex"}),"MDN\ubb38\uc11c: lastIndex")),Object(c.b)("p",null,"RegExp \uac1d\uccb4(\uc778\uc2a4\ud134\uc2a4)\uc758 ",Object(c.b)("strong",{parentName:"p"},"\uc815\uaddc\uc2dd\uc758 \uac80\uc0c9 \uc2dc\uc791 \uc704\uce58\ub97c \ub2f4\uace0 \uc788\ub294 \uc18d\uc131"),"\uc774\ub77c\uace0 \uc0dd\uac01\ud558\uba74 \ub420 \uac83 \uac19\ub2e4"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},"\uac12 \uc5c5\ub370\uc774\ud2b8 \uc870\uac74",Object(c.b)("ul",{parentName:"li"},Object(c.b)("li",{parentName:"ul"},"\uc815\uaddc \ud45c\ud604\uc2dd\uc5d0\xa0",Object(c.b)("inlineCode",{parentName:"li"},"\uc804\uc5ed \ud50c\ub798\uadf8(/g)"),"\ub97c \uc124\uc815\ud560 \uacbd\uc6b0\uc5d0\ub9cc \uc791\ub3d9\ub418\uba70, \uc804\uc5ed \ud50c\ub798\uadf8\ub97c \ub123\uc9c0 \uc54a\uc740 \uc778\uc2a4\ud134\uc2a4\uc5d0\uc11c\ub294 ",Object(c.b)("inlineCode",{parentName:"li"},"\ud56d\uc0c1 0"),"\uc774\ub2e4"),Object(c.b)("li",{parentName:"ul"},"\uc608\ub97c \ub4e4\uc5b4 ",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test"}),Object(c.b)("inlineCode",{parentName:"a"},"test()")),"\xa0\uba54\uc11c\ub4dc (\ud639\uc740 ",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec"}),"exec()"),")\ub97c \uc804\uc5ed \ud50c\ub798\uadf8(/g)\uc640 \ud568\uaed8 \uc0ac\uc6a9\ud560 \uacbd\uc6b0, \uc815\uaddc \ud45c\ud604\uc2dd\uc758\xa0",Object(c.b)("inlineCode",{parentName:"li"},"lastIndex"),"\ub97c \uc5c5\ub370\uc774\ud2b8\ud55c\ub2e4"),Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"test(str)"),"\uc744 \ub610 \ud638\ucd9c\ud558\uba74\xa0",Object(c.b)("inlineCode",{parentName:"li"},"str"),"\xa0\uac80\uc0c9\uc744\xa0",Object(c.b)("inlineCode",{parentName:"li"},"lastIndex"),"\ubd80\ud130 \uacc4\uc18d \uc9c4\ud589\ud569\ub2c8\ub2e4.\xa0",Object(c.b)("inlineCode",{parentName:"li"},"lastIndex"),"\xa0\uc18d\uc131\uc740 \ub9e4 \ubc88\xa0",Object(c.b)("inlineCode",{parentName:"li"},"test()"),"\uac00\xa0",Object(c.b)("inlineCode",{parentName:"li"},"true"),"\ub97c \ubc18\ud658\ud560 \ub54c\ub9c8\ub2e4 \uc99d\uac00\ud558\uac8c \ub429\ub2c8\ub2e4."))),Object(c.b)("li",{parentName:"ul"},"\uac12 \ucd08\uae30\ud654 \uc870\uac74",Object(c.b)("ul",{parentName:"li"},Object(c.b)("li",{parentName:"ul"},"\uba54\uc18c\ub4dc(",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test"}),"test()"),", ",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec"}),"exec()"),")\uc758 \uacb0\uacfc\uac00\xa0",Object(c.b)("inlineCode",{parentName:"li"},"false"),"\ub97c \ubc18\ud658\ud560 \ub550\xa0",Object(c.b)("inlineCode",{parentName:"li"},"lastIndex"),"\xa0\uc18d\uc131\uc774\xa0",Object(c.b)("inlineCode",{parentName:"li"},"0"),"\uc73c\ub85c \ucd08\uae30\ud654\ub41c\ub2e4",Object(c.b)("div",Object(n.a)({parentName:"li"},{className:"admonition admonition-caution alert alert--warning"}),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})))),"caution")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"}," ",Object(c.b)("inlineCode",{parentName:"p"},"test()"),"\uac00\xa0",Object(c.b)("inlineCode",{parentName:"p"},"true"),"\ub97c \ubc18\ud658\ud558\uae30\ub9cc \ud558\uba74\xa0",Object(c.b)("inlineCode",{parentName:"p"},"lastIndex"),"\ub294 \ucd08\uae30\ud654\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \uc2ec\uc9c0\uc5b4 \uc774\uc804\uacfc \ub2e4\ub978 \ubb38\uc790\uc5f4\uc744 \ub9e4\uac1c\ubcc0\uc218\ub85c \uc81c\uacf5\ud574\ub3c4 \uadf8\ub807\uc2b5\ub2c8\ub2e4!"))))))),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"\ucc38\uace0: ",Object(c.b)("a",Object(n.a)({parentName:"strong"},{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test#%EC%A0%84%EC%97%AD_%ED%94%8C%EB%9E%98%EA%B7%B8%EC%99%80_test"}),"\uc804\uc5ed \ud50c\ub798\uadf8\uc640 test()"))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"const regex = /foo/g; // the \"global\" flag is set\n\nconsole.log(regex.lastIndex) // 0\n\nconsole.log(regex.test('foo')) // true\nconsole.log(regex.lastIndex) // 3\n\nconsole.log(regex.test('foo')) // false\nconsole.log(regex.lastIndex) // 0\n\nconsole.log(regex.test('barfoo')) // true\nconsole.log(regex.lastIndex) // 6\n\nconsole.log(regex.test('foobar')) //false\nconsole.log(regex.lastIndex) // 0\n\n// regex.lastIndex is at 0\n// (...and so on)\n")),Object(c.b)("h3",{id:"exec"},"exec()"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec"}),"MDN\ubb38\uc11c: exec()")),Object(c.b)("p",null,"\uc8fc\uc5b4\uc9c4 \ubb38\uc790\uc5f4\uc5d0\uc11c \uc77c\uce58 \ud0d0\uc0c9\uc744 \uc218\ud589\ud55c \uacb0\uacfc\ub97c ",Object(c.b)("inlineCode",{parentName:"p"},"\ubc30\uc5f4")," \ud639\uc740 ",Object(c.b)("inlineCode",{parentName:"p"},"null"),"\ub85c \ubc18\ud658"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var regex1 = RegExp(\'foo*\', \'g\');\nvar str1 = \'table football, foosball\';\n\nconsole.log(regex1.exec(str1)); // ["foo", index: 6, input: "table football, foosball", groups: undefined]\nconsole.log(regex1.lastIndex); // 9\n\nconsole.log(regex1.exec(str1)); // ["foo", index: 16, input: "table football, foosball", groups: undefined]\nconsole.log(regex1.lastIndex); // 19\n')),Object(c.b)("h3",{id:"test"},"test()"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test"}),"MDN\ubb38\uc11c: test()")),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"/* Case 1 */\nconst str = 'table football';\nconst regex = new RegExp('foo*');\n\nconsole.log(regex.test(str)); // \uacb0\uacfc -> true\n\n/* Case 2 */\nconst str = 'hello world!';\nconst result = /^hello/.test(str);\n\nconsole.log(result); // \uacb0\uacfc -> true\n")),Object(c.b)("h2",{id:"string"},"String"),Object(c.b)("h3",{id:"match"},"match()"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/match"}),"MDN\ubb38\uc11c: match()")),Object(c.b)("p",null,"\ubb38\uc790\uc5f4\uc774 \uc815\uaddc\uc2dd\uacfc \ub9e4\uce58\ub418\ub294 \ubd80\ubd84\uc744 \uac80\uc0c9"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var src = "azcafAJAC";\nvar reg = /[a-c]/;\n\nsrc.**match**(reg); // ["a", index: 0, input: "azcafAJAC"]\nsrc.match(/[a-c]/g) // (3)\xa0["a", "c", "a"]\n')),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"var str = 'For more information, see Chapter 3.4.5.1';\nvar re = /see (chapter \\d+(\\.\\d)*)/i; // <- \uc815\uaddc\uc2dd \ub0b4\uc5d0\uc11c \uad04\ud638\ub85c \ubb36\uc5b4\ub0b4\uc5b4 \ubb36\uc740 \uad04\ud638\uc5d0 \ud574\ub2f9\ud558\ub294 \uacb0\uacfc \ub610\ud55c \ub530\ub85c \ubc1b\uc544\ubcfc \uc218 \uc788\ub2e4.\nvar found = str.match(re);\n\nconsole.log(found);\n\n// logs [ 'see Chapter 3.4.5.1',\n// 'Chapter 3.4.5.1',\n// '.1',\n// index: 22,\n// input: 'For more information, see Chapter 3.4.5.1' ]\n\n// 'see Chapter 3.4.5.1'\ub294 \uc644\uc804\ud55c \ub9e4\uce58 \uc0c1\ud0dc\uc784.\n// 'Chapter 3.4.5.1'\ub294 '(chapter \\d+(\\.\\d)*)' \ubd80\ubd84\uc5d0 \uc758\ud574 \ubc1c\uacac\ub41c \uac83\uc784.\n// '.1' \ub294 '(\\.\\d)'\ub97c \ud1b5\ud574 \ub9e4\uce58\ub41c \ub9c8\uc9c0\ub9c9 \uac12\uc784.\n// 'index' \uc694\uc18c\uac00 (22)\ub77c\ub294 \uac83\uc740 0\uc5d0\uc11c\ubd80\ud130 \uc140 \ub54c 22\ubc88\uc9f8 \uc704\uce58\ubd80\ud130 \uc644\uc804 \ub9e4\uce58\ub41c \ubb38\uc790\uc5f4\uc774 \ub098\ud0c0\ub0a8\uc744 \uc758\ubbf8\ud568.\n// 'input' \uc694\uc18c\ub294 \uc785\ub825\ub41c \uc6d0\ub798 \ubb38\uc790\uc5f4\uc744 \ub098\ud0c0\ub0c4.\n")),Object(c.b)("h3",{id:"replace"},"replace()"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/replace"}),"MDN\ubb38\uc11c: replace()")),Object(c.b)("p",null,"\uc5b4\ub5a4 \ud328\ud134\uc5d0 \uc77c\uce58\ud558\ub294 \uc77c\ubd80 \ub610\ub294 \ubaa8\ub4e0 \ubd80\ubd84\uc774 \uad50\uccb4\ub41c \uc0c8\ub85c\uc6b4 \ubb38\uc790\uc5f4\uc744 \ubc18\ud658"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"var p = 'The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?';\n\nconsole.log(p.replace('dog', 'monkey'));\n// -> \"The quick brown fox jumps over the lazy **monkey**. If the dog reacted, was it really lazy?\"\n\nvar regex = /Dog/i; // <- \ud50c\ub798\uadf8 \ud65c\uc6a9\nconsole.log(p.replace(regex, 'ferret'));\n// -> \"The quick brown fox jumps over the lazy **ferret**. If the dog reacted, was it really lazy?\"\n\nvar regex = /Dog/gi; // <- \ud50c\ub798\uadf8 \ud65c\uc6a9\nconsole.log(p.replace(regex, 'ferret'));\n// -> The quick brown fox jumps over the lazy **ferret**. If the **ferret** reacted, was it really lazy?\n")),Object(c.b)("h3",{id:"search"},"search()"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/search"}),"MDN\ubb38\uc11c: search()")),Object(c.b)("p",null,"\uc815\uaddc\ud45c\ud604\uc2dd\uacfc \uc8fc\uc5b4\uc9c4 \uc2a4\ud2b8\ub9c1\uac04\uc5d0 ",Object(c.b)("inlineCode",{parentName:"p"},"\uccab\ubc88\uc9f8\ub85c \ub9e4\uce58\ub418\ub294 \uac83\uc758 \uc778\ub371\uc2a4"),"\ub97c \ubc18\ud658\ud55c\ub2e4."),Object(c.b)("p",null,"\ucc3e\uc9c0 \ubabb\ud558\uba74 ",Object(c.b)("inlineCode",{parentName:"p"},"-1")," \uc744 \ubc18\ud658\ud55c\ub2e4"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"const paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?';\n\n// \ubb38\uc790(\\w)\ub098 \uacf5\ubc31(\\s)\uc774 \uc544\ub2cc(^) \uc815\uaddc\uc2dd\nconst regex = /[^\\w\\s]/;\n\nconsole.log(paragraph.search(regex)); // 43\n\nconsole.log(paragraph[paragraph.search(regex)]); // \".\"\n")),Object(c.b)("h3",{id:"split"},"split()"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/split"}),"MDN\ubb38\uc11c: split()")),Object(c.b)("p",null,"\uc8fc\uc5b4\uc9c4 \ubb38\uc790\uc5f4\uc744 separator\ub9c8\ub2e4 \ub04a\uc740 \ubd80\ubd84 \ubb38\uc790\uc5f4\uc744 \ub2f4\uc740 Array."),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"const str = 'The quick brown fox jumps over the lazy dog.';\n\nconst words = str.split(' ');\nconsole.log(words[3]); // \"fox\"\n\nconst chars = str.split('');\nconsole.log(chars[8]); // \"k\"\n\nconst strCopy = str.split();\nconsole.log(strCopy); // [\"The quick brown fox jumps over the lazy dog.\"]\n")),Object(c.b)("h3",{id:"-\ud2b9\uc218\ubb38\uc790-\ubb38\uc790\uc5f4\uacfc-split-\uc0ac\uc6a9-\uc2dc-\uc8fc\uc758"},"* \ud2b9\uc218\ubb38\uc790 \ubb38\uc790\uc5f4\uacfc split('') \uc0ac\uc6a9 \uc2dc \uc8fc\uc758"),Object(c.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},Object(c.b)("strong",{parentName:"p"},"MDN \uacf5\uc2dd \ubb38\uc11c \uc648,"),"\n\ud2b9\uc218\ubb38\uc790 \ubb38\uc790\uc5f4\uc744 ",Object(c.b)("strong",{parentName:"p"},"split('')"),"\uc73c\ub85c \ub098\ub258\uba74 \uce90\ub9ad\ud130\uac00 \uae68\uc9d0. ",Object(c.b)("inlineCode",{parentName:"p"},"UTF-16 \ucf54\ub4dc\uc720\ub2db"),"\uc73c\ub85c \ub098\ub204\uac8c \ub418\uae30 \ub54c\ubb38\uc774\ub77c\uace0 \ud568.\n",Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Spread_syntax"}),"\uc2a4\ud504\ub808\ub4dc \uc5f0\uc0b0\uc790"),"\ub098 ",Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/from"}),"Array.from")," \ub4f1\uc744 \uc774\uc6a9\ud560 \uac83\uc744 \uad8c\uc7a5\ud55c\ub2e4\uace0 ",Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402"}),"stackoverflow \uc9c8\ubb38"),"\uc744 \ub9c1\ud06c \uac78\uc5b4 \uc18c\uac1c \ud574 \uc8fc\uace0 \uc788\uc74c."))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'// \ubb38\uc81c\uc810\n\'I\ud83d\udc96U\'.split(\'\') // (4)\xa0["I", "\ufffd", "\ufffd", "U"]\n\n// \ud574\uacb0\ucc45\nArray.from(\'I\ud83d\udc96U\'); // (3)\xa0["I", "\ud83d\udc96", "U"]\n[...\'I\ud83d\udc96U\']; // (3)\xa0["I", "\ud83d\udc96", "U"]\n')),Object(c.b)("p",{style:{height:"2rem"}}),Object(c.b)(i.a.Google,{client:"undefined",slot:"undefined",style:{display:"block"},format:"auto",responsive:"true"}),Object(c.b)("p",{style:{height:"2rem"}}),Object(c.b)("h2",{id:"\ubb38\uc790-\ud074\ub798\uc2a4"},"\ubb38\uc790 \ud074\ub798\uc2a4"),Object(c.b)("h3",{id:"backslash"},"backslash(\uc5ed\uc2ac\ub798\uc26c: \\)"),Object(c.b)("p",null,"\ubb38\uc790 \uadf8\ub300\ub85c \ud574\uc11d\ud558\uba74 \uc548\ub41c\ub2e4\uace0 \uc54c\ub824\uc8fc\ub294\uac70\uc784."),Object(c.b)("div",{className:"admonition admonition-info alert alert--info"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"info")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},"\\","*, \\b, ","\\","(\ud2b9\uc218\ubb38\uc790) \u2026"))),Object(c.b)("h3",{id:"asterisk"},"'*'"),Object(c.b)("p",null,Object(c.b)("inlineCode",{parentName:"p"},"0\ud68c \uc774\uc0c1")," \uc5f0\uc18d\uc73c\ub85c \ubc18\ubcf5\ub418\ub294 \ubd80\ubd84\uacfc \ub300\uc751\ub41c\ub2e4"),Object(c.b)("div",{className:"admonition admonition-info alert alert--info"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"info")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},Object(c.b)("strong",{parentName:"p"},"{0,}")," \ud45c\ud604\uacfc \uac19\ub2e4"))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'`get reeeeeeady`.match(/re*/)\n// -> ["reeeeee", index: 4, input: "get reeeeeeady"]\n\n`get reeeeeeady`.match(/re{0,}/)\n// -> ["reeeeee", index: 4, input: "get reeeeeeady"]\n\n`get reeeeeeady`.match(/re{0,1}/)\n// -> ["re", index: 4, input: "get reeeeeeady"]\n\n`get reeeeeeady`.match(/re{0,2}/)\n// -> ["ree", index: 4, input: "get reeeeeeady"]\n')),Object(c.b)("h3",{id:"plus"},"'+'"),Object(c.b)("p",null,Object(c.b)("inlineCode",{parentName:"p"},"1\ud68c \uc774\uc0c1")," \uc5f0\uc18d\uc73c\ub85c \ubc18\ubcf5\ub418\ub294 \ubd80\ubd84\uacfc \ub300\uc751\ub41c\ub2e4"),Object(c.b)("div",{className:"admonition admonition-info alert alert--info"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"info")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},Object(c.b)("strong",{parentName:"p"},"{1,}")," \ud45c\ud604\uacfc \uac19\ub2e4"))),Object(c.b)("h3",{id:"compare-plus-asterisk"},"'+'\uc640 '*'\uc758 \ucc28\uc774 \ube44\uad50"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'`get reeeeeeady`.match(/e+/)\n// -> ["e", index: 1, input: "get reeeeeeady", groups: undefined]\n\n`get reeeeeeady`.match(/e*/)\n// -> ["", index: 0, input: "get reeeeeeady", groups: undefined]\n\n/* g \ud50c\ub798\uadf8 \uc0ac\uc6a9 */\n`get reeeeeeady`.match(/e+/g)\n// -> (2)\xa0["e", "eeeeee"]\n\n`get reeeeeeady`.match(/e*/g)\n// -> (10)\xa0["", "e", "", "", "", "eeeeee", "", "", "", ""]\n')),Object(c.b)("h3",{id:"question"},"'?'"),Object(c.b)("p",null,"\uc55e\uc758 \ud45c\ud604\uc2dd\uc774 ",Object(c.b)("inlineCode",{parentName:"p"},"0 \ub610\ub294 1\ud68c")," \ub4f1\uc7a5\ud558\ub294 \ubd80\ubd84\uacfc \ub300\uc751\ub41c\ub2e4"),Object(c.b)("div",{className:"admonition admonition-info alert alert--info"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"info")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},Object(c.b)("strong",{parentName:"p"},"{0,1}")," \ud45c\ud604\uacfc \uac19\uc740 \uc758\ubbf8."))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'`get reeeeeeady`.match(/re{0,1}/)\n// -> ["re", index: 4, input: "get reeeeeeady"]\n')),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"'?' \uac00 \ubd99\uc5c8\uc744 \ub54c\uc640 \uc548 \ubd99\uc5c8\uc744 \ub54c\uc758 \ucc28\uc774")),Object(c.b)("p",null,"\ub9cc\uc57d \uc218\ub7c9\uc790 *, +, ?, {} \ubc14\ub85c \ub4a4\uc5d0 \uc0ac\uc6a9\ud558\uba74, \uae30\ubcf8\uc801\uc73c\ub85c \ud0d0\uc695\uc2a4\ub7fd\ub358(\uac00\ub2a5\ud55c \ud55c \ub9ce\uc774 \ub300\uc751\uc2dc\ud0b4) \uc218\ub7c9\uc790\ub97c \ud0d0\uc695\uc2a4\ub7fd\uc9c0 \uc54a\uac8c(\uac00\ub2a5\ud55c \uac00\uc7a5 \uc801\uc740 \ubb38\uc790\ub4e4\uc5d0 \ub300\uc751\uc2dc\ud0b4) \ub9cc\ub4ed\ub2c8\ub2e4"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'"123abc".match(/\\d+/)\n// -> ["123", index: 0, input: "123abc", groups: undefined]\n\n"123abc".match(/\\d+?/)\n// -> ["1", index: 0, input: "123abc", groups: undefined]\n')),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"'angel'\uacfc 'angle'\uc758 \uac19\uc740 \uc815\uaddc\uc2dd\uc744 \ub193\uace0 \uacb0\uacfc \ube44\uad50")),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'\'angel\'.match(/e?le?/)\n// -> ["el", index: 3, input: "angel", groups: undefined]\n\n\'angle\'.match(/e?le?/)\n// -> ["le", index: 3, input: "angle", groups: undefined]\n')),Object(c.b)("h3",{id:"dot"},"'.'"),Object(c.b)("p",null,Object(c.b)("inlineCode",{parentName:"p"},"\uac1c\ud589 \ubb38\uc790(newline character, \\n)\ub97c \uc81c\uc678\ud55c \ubaa8\ub4e0 \ub2e8\uc77c \ubb38\uc790"),"\uc640 \ub300\uc751\ub428"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},"\ud0a4\ubcf4\ub4dc\uc758 \ud2b9\uc218\ubb38\uc790\ub294 \ub2e4 \ub300\uc751\uc774 \ub418\ub294 \ub4ef \ud568"),Object(c.b)("li",{parentName:"ul"},"\uadf8\ub7ec\ub098 emoji (e.g., \ud83d\udc96, \ud83d\ude04, \ud83c\udf89) \ub294 \uacb0\uacfc \uac12 \uc548\uc5d0\uc11c \uae68\uc9d0",Object(c.b)("ul",{parentName:"li"},Object(c.b)("li",{parentName:"ul"},"\uc774\ub7f4 \ub54c\ub294 ",Object(c.b)("inlineCode",{parentName:"li"},"[u \ud50c\ub798\uadf8]()"),"\ub97c \ud65c\uc6a9\ud558\uc5ec \uc815\uaddc\uc2dd\uc774 \uc720\ub2c8\ucf54\ub4dc \ucde8\uae09\uc744 \ud558\ub3c4\ub85d \ud55c\ub2e4")))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var str = \'nay, an apple is on the tree\';\nstr.match(/.n/);\n// -> ["an", index: 5, input: "nay, an apple is on the tree", groups: undefined]\nstr.match(/.n../)\n// -> ["an a", index: 5, input: "nay, an apple is on the tree", groups: undefined]\n\n/* g \ud50c\ub798\uadf8 */\nvar str = \'nay, an apple is on the tree\';\nstr.match(/.n/g); // -> (2)\xa0["an", "on"]\nstr.match(/.n../g); // -> (2)\xa0["an a", "on t"]\n\n/* \\t \uc774 \ud3ec\ud568\ub41c string */\n\'nay, a\\tn apple is on the tree\'.match(/.n../)\n// -> [" n a", index: 6, input: "nay, a n apple is on the tree", groups: undefined]\n\n/* \ud2b9\uc218\ubb38\uc790 */\n\'nay, a!@#~!n apple is on the tree\'.match(/...n/)\n// -> ["#~!n", index: 8, input: "nay, a!@#~!n apple is on the tree", groups: undefined]\n\n/* Emoji: \uae68\uc9d0 */\n\'nay, a\ud83d\ude04n apple is on the tree\'.match(/.n../)\n// -> ["\ufffdn a", index: 7, input: "nay, a\ud83d\ude04n apple is on the tree", groups: undefined]\n\n/* Emoji\ub294 u\ud50c\ub798\uadf8\ub85c \uc720\ub2c8\ucf54\ub4dc \ucde8\uae09\uc744 \uc2dc\ud0a4\ub3c4\ub85d \ud55c\ub2e4 */\n\'nay, a\ud83d\ude04n apple is on the tree\'.match(/.n../u)\n// -> ["\ud83d\ude04n a", index: 6, input: "nay, a\ud83d\ude04n apple is on the tree", groups: undefined]\n')),Object(c.b)("h3",{id:"newline"},"newline(\uac1c\ud589\ubb38\uc790: \\n)"),Object(c.b)("p",null,"\uc815\uaddc\uc2dd \ub0b4\ubd80\uc758\xa0",Object(c.b)("inlineCode",{parentName:"p"},"n\ubc88\uc9f8 \uad04\ud638"),"\uc5d0\uc11c \ub300\uc751\ub41c\xa0\ubd80\ubd84\uc5d0 \ub300\ud55c\xa0",Object(c.b)("inlineCode",{parentName:"p"},"\uc5ed\ucc38\uc870")," \uc785\ub2c8\ub2e4.\xa0\uc5ec\uae30\uc11c,\xa0",Object(c.b)("inlineCode",{parentName:"p"},"n\uc740 \uc591\uc758 \uc815\uc218"),"\uc785\ub2c8\ub2e4."),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var re = /apple(,)\\sorange\\1/;\nre.exec(\'apple, orange, cherry, peach.\')\n// -> (2)\xa0["apple, orange,", ",", index: 0, input: "apple, orange, cherry, peach.", groups: undefined]\n// : \uacb0\uacfc\ub85c \ub098\uc628 2\uac1c \ud56d\ubaa9 \uc911 **\ub450\ubc88\uc9f8 \ud56d\ubaa9**\uc774 **1\ubc88\uc9f8 \uad04\ud638(\\1)**\uc5d0 \ub300\uc751\ub418\ub294 \uac12\uc774\ub2e4.\n')),Object(c.b)("h3",{id:"assertion-xyz"},"[^xyz]"),Object(c.b)("p",null,"\ub300\uad04\ud638\uac00 \uc591\uc606\uc73c\ub85c \ubb36\uc5ec\uc788\ub294 \uc5ec\uae30\uc5d0\uc11c\uc758 ",Object(c.b)("inlineCode",{parentName:"p"},"^"),"\ub294 \ubd80\uc815\uae30\ud638 ",Object(c.b)("inlineCode",{parentName:"p"},"NOT"),"\uc758 \uc758\ubbf8\uc774\ub2e4."),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'\'brisket\'.match(/[^are]/g)\n// -> (5)\xa0["b", "i", "s", "k", "t"]: \'a\', \'r\', \'e\'\ub97c \uc81c\uc678\ud55c \ubb38\uc790 \uc804\uccb4 \uac80\uc0c9\n')),Object(c.b)("h3",{id:"backslash-w"},"\\w"),Object(c.b)("p",null,Object(c.b)("inlineCode",{parentName:"p"},"\ubc11\uc904 \ubb38\uc790\ub97c \ud3ec\ud568\ud55c \uc601\uc22b\uc790 \ubb38\uc790"),"\uc5d0 \ub300\uc751\ub429\ub2c8\ub2e4."),Object(c.b)("div",{className:"admonition admonition-info alert alert--info"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"info")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},Object(c.b)("strong",{parentName:"p"},"[A-Za-z0-9_]"),"\xa0\uc640 \ub3d9\uc77c"))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var re = /\\w/;\nre.exec(\'apple,\'); // ["a", index: 0, input: "apple,", groups: undefined]\nre.exec(\'$5.28,\'); // ["5", index: 1, input: "$5.28,", groups: undefined]\nre.exec(\'3D.\'); // ["3", index: 0, input: "3D.", groups: undefined]\n')),Object(c.b)("h3",{id:"backslash-W"},"\\W"),Object(c.b)("p",null,Object(c.b)("inlineCode",{parentName:"p"},"\ub2e8\uc5b4 \ubb38\uc790\uac00 \uc544\ub2cc \ubb38\uc790"),"\uc5d0 \ub300\uc751\ub429\ub2c8\ub2e4."),Object(c.b)("div",{className:"admonition admonition-info alert alert--info"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"info")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},Object(c.b)("strong",{parentName:"p"},Object(c.b)("sup",Object(n.a)({parentName:"strong"},{id:"fnref-a-za-z0-9_"}),Object(c.b)("a",Object(n.a)({parentName:"sup"},{href:"#fn-a-za-z0-9_",className:"footnote-ref"}),"A-Za-z0-9_"))),"\xa0\uc640 \ub3d9\uc77c"))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var re = /\\W/;\nre.exec(\'50%.\'); // ["%", index: 2, input: "50%.", groups: undefined]\n')),Object(c.b)("h3",{id:"backslash-square-b"},"[\\b]"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"[\\b]"),"\ub294 \ubc31\uc2a4\ud398\uc774\uc2a4\uc5d0 \ub300\uc751\ub428")),Object(c.b)("h3",{id:"backslash-big-d"},"\\D"),Object(c.b)("p",null,Object(c.b)("inlineCode",{parentName:"p"},"\uc22b\uc790\uac00 \uc544\ub2cc \ubb38\uc790"),"\uc5d0 \ub300\uc751"),Object(c.b)("div",{className:"admonition admonition-info alert alert--info"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"info")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},Object(c.b)("strong",{parentName:"p"},Object(c.b)("inlineCode",{parentName:"strong"},"[^0-9]"))," \uc640 \ub3d9\uc77c"))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'\'\uc548\ub155!abc123\'.match(/\\W+/);\n// -> ["\uc548\ub155!", index: 0, input: "\uc548\ub155!abc123", groups: undefined]\n')),Object(c.b)("h3",{id:"backslash-s"},"\\s"),Object(c.b)("p",null,"\uc544\ub798 \ud56d\ubaa9\uc5d0 \ub300\uc751\ub428"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"\uc0ac\uc774\ub744\uac1c(\uc2a4\ud398\uc774\uc2a4)")),Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"\ud0ed")," (",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Guide/%EC%A0%95%EA%B7%9C%EC%8B%9D#special-tab"}),"\\t"),")"),Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"\ud3fc\ud53c\ub4dc")," (",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Guide/%EC%A0%95%EA%B7%9C%EC%8B%9D#special-form-feed"}),"\\f"),")"),Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"\uc904 \ubc14\uafc8")," (",Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Guide/%EC%A0%95%EA%B7%9C%EC%8B%9D#special-line-feed"}),"\\n"),")"),Object(c.b)("li",{parentName:"ul"},"\ub4f1\uc758 ",Object(c.b)("inlineCode",{parentName:"li"},"\ud558\ub098\uc758 \uacf5\ubc31 \ubb38\uc790"))),Object(c.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},"[ \\f\\n\\r\\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]",". \uc640 \ub3d9\uc77c"))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'\'foo bar\'.match(/\\s\\w*/)\n// -> [" bar", index: 3, input: "foo bar", groups: undefined]\n')),Object(c.b)("h3",{id:"backslash-big-s"},"\\S"),Object(c.b)("p",null,Object(c.b)("inlineCode",{parentName:"p"},"\uacf5\ubc31 \ubb38\uc790\uac00 \uc544\ub2cc \ud558\ub098\uc758 \ubb38\uc790"),"\uc5d0 \ub300\uc751\ub429\ub2c8\ub2e4."),Object(c.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},"[^ \\f\\n\\r\\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]. \uc640 \ub3d9\uc77c"))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'\'foo bar\'.match(/\\S\\w*/)\n// -> ["foo", index: 0, input: "foo bar", groups: undefined]\n')),Object(c.b)("br",null),Object(c.b)(i.a.Google,{client:"undefined",slot:"undefined",style:{display:"block"},format:"auto",responsive:"true"}),Object(c.b)("br",null),Object(c.b)("h2",{id:"assertion"},"Assertion"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Guide/%EC%A0%95%EA%B7%9C%EC%8B%9D/Assertions"}),"Assertion \uc6d0\ubb38")," (en: ",Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Assertions"}),"Assertions"),")"),Object(c.b)("p",null,"\ud589\uc774\ub098 \ub2e8\uc5b4\uc758 \uc2dc\uc791 \xb7 \ub05d\uc744 \ub098\ud0c0\ub0b4\ub294 \uacbd\uacc4\uc640 (\uc55e, \ub4a4 \uc77d\uace0 \uc870\uac74\uc2dd\uc744 \ud3ec\ud568\ud55c) \uc5b4\ub5a4 \uc2dd \uc73c\ub85c\ub4e0 \ub9e4\uce58\uac00 \uac00\ub2a5\ud55c \uac83\uc744 \ub098\ud0c0\ub0b4\ub294 \ub2e4\ub978 \ud328\ud134\uc774 \ud3ec\ud568\ub429\ub2c8\ub2e4."),Object(c.b)("h3",{id:"\ubc14\uc6b4\ub354\ub9ac-\ud0c0\uc785-assertionsboundary-type-assertions"},"\ubc14\uc6b4\ub354\ub9ac \ud0c0\uc785 assertions(Boundary-type assertions)"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Assertions#boundary-type_assertions"}),"MDN\ubb38\uc11c: Boundary-type assertions")),Object(c.b)("h4",{id:"assertion-half-smile"},"'^'"),Object(c.b)("p",null,"\uc785\ub825 \uc2dc\uc791\uc5d0 \uc77c\uce58\uc2dc\ud0a8\ub2e4."),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"var re = /^A/;\nre.exec('an A'); // null\nre.exec('An A'); // [\"A\", index: 0, input: \"An A\", groups: undefined]\n")),Object(c.b)("h4",{id:"assertion-dollar"},"'$'"),Object(c.b)("p",null,"\uc785\ub825\uc758 \ub05d\uc5d0 \uc77c\uce58\uc2dc\ud0a8\ub2e4."),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"var re = /t$/\nre.exec('eat'); // [\"t\", index: 2, input: \"eat\", groups: undefined]\nre.exec('eat something'); // null\n")),Object(c.b)("h4",{id:"assertion-backslash-b"},"\\b"),Object(c.b)("p",null,"\ucc38\uace0\ubb38\ud5cc"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://ko.javascript.info/regexp-boundary"}),"Javascript.info")),Object(c.b)("li",{parentName:"ul"},Object(c.b)("a",Object(n.a)({parentName:"li"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Guide/Regular_Expressions#special-word-boundary"}),"MDN: \uc815\uaddc \ud45c\ud604\uc2dd - \\b"))),Object(c.b)("p",null,"\ub2e8\uc5b4 \uacbd\uacc4\uc5d0 \ub300\uc751\ub41c\ub2e4"),Object(c.b)("p",null,"= ",Object(c.b)("inlineCode",{parentName:"p"},"\ub2e4\ub978")," ",Object(c.b)("strong",{parentName:"p"},Object(c.b)("inlineCode",{parentName:"strong"},"\ub2e8\uc5b4 \ubb38\uc790"))," ",Object(c.b)("inlineCode",{parentName:"p"},"\uac00 \uc55e\uc774\ub098 \ub4a4\uc5d0 \ub4f1\uc7a5\ud558\uc9c0 \uc54a\ub294 \uc704\uce58"),"\uc5d0 \ub300\uc751"),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"\ub2e8\uc5b4 \ubb38\uc790"),": \ub85c\ub9c8\uc790 \uc18c\ubb38\uc790\uc640 \ub300\ubb38\uc790, 10\uc9c4\uc218 \uc22b\uc790, \ubc11\uc904 \ubb38\uc790\n\uadf8 \uc678\uc758 \ubaa8\ub4e0 \ubb38\uc790\ub294 ",Object(c.b)("strong",{parentName:"p"},"\ub2e8\uc5b4 \ubd84\ub9ac(word break)")),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"\\b ")," ",Object(c.b)("strong",{parentName:"li"},Object(c.b)("inlineCode",{parentName:"strong"},"\ub2e4\uc74c"))," ",Object(c.b)("inlineCode",{parentName:"li"},"\uc5d0 \ubb38\uc790\uac00 \ub4e4\uc5b4\uac00\uba74"),", \ud574\ub2f9 \ubb38\uc790 ",Object(c.b)("strong",{parentName:"li"},Object(c.b)("inlineCode",{parentName:"strong"},"\uc55e\uc5d0"))," \uc544\ubb34\uac83\ub3c4 \uc5c6\uc5b4\uc57c \ub300\uc751"),Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"\\b ")," ",Object(c.b)("strong",{parentName:"li"},Object(c.b)("inlineCode",{parentName:"strong"},"\uc774\uc804"))," ",Object(c.b)("inlineCode",{parentName:"li"},"\uc5d0 \ubb38\uc790\uac00 \ub4e4\uc5b4\uac00\uba74"),", \ud574\ub2f9 \ubb38\uc790 ",Object(c.b)("strong",{parentName:"li"},Object(c.b)("inlineCode",{parentName:"strong"},"\ub4a4\uc5d0"))," \uc544\ubb34\uac83\ub3c4 \uc5c6\uc5b4\uc57c \ub300\uc751")),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var randomData = "015 354 8787 687351 3512 8735";\nvar regexpFourDigits = /\\b\\d{4}\\b/g;\nrandomData.match(regexpFourDigits)\n// -> (3)\xa0["8787", "3512", "8735"]\n\n\'moon\'.match(/\\bm/); // ["m", index: 0, input: "moon", groups: undefined]\n\'moon\'.match(/m\\b/); // null\n\'moon\'.match(/oo\\b/);\n// -> null\n// : \'oo\' \ubd80\ubd84\uc5d0 \ub300\uc751\ub418\uc9c0 \uc54a\ub294\ub370, \uc65c\ub0d0\ud558\uba74 \'oo\'\ub97c \ub4a4\ub530\ub77c\uc624\ub294 \'n\'\uc774 \ub2e8\uc5b4 \ubb38\uc790\uc774\uae30 \ub54c\ubb38\n\n\'moon\'.match(/oon\\b/);\n// -> ["oon", index: 1, input: "moon", groups: undefined]\n// : \'oon\'\uc740 \ubb38\uc790\uc5f4\uc758 \ub05d\uc774\ub77c\uc11c, \ub4a4\ub530\ub77c\uc624\ub294 \ub2e8\uc5b4 \ubb38\uc790\uac00 \uc5c6\uae30 \ub54c\ubb38\n\n/* \ub2e8\uc5b4 \ubb38\uc790 \ud2b9\uc131 \uc774\uc6a9 */\n\'__alsKDjf00-asdfasdf\'.match(/\\b__alsKDjf00/);\n// -> ["__alsKDjf00", index: 0, input: "__alsKDjf00-asdfasdf", groups: undefined]\n')),Object(c.b)("h4",{id:"assertion-backslash-big-b"},"\\B"),Object(c.b)("p",null,Object(c.b)("inlineCode",{parentName:"p"},"\ub2e8\uc5b4 \uacbd\uacc4\uac00 \uc544\ub2cc \ubd80\ubd84"),"\uc5d0 \ub300\uc751"),Object(c.b)("p",null,"\uc544\ub798\uc640 \uac19\uc740 \uacbd\uc6b0\ub4e4\uc5d0 \ud574\ub2f9"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},"\ubb38\uc790\uc5f4\uc758 \uccab\ubc88\uc9f8 \ubb38\uc790\uac00 ",Object(c.b)("strong",{parentName:"li"},"\ub2e8\uc5b4 \ubb38\uc790\uac00 \uc544\ub2cc \uacbd\uc6b0"),", \ud574\ub2f9 \ubb38\uc790\uc758 \uc55e \ubd80\ubd84\uc5d0 \ub300\uc751\ub429\ub2c8\ub2e4."),Object(c.b)("li",{parentName:"ul"},"\ubb38\uc790\uc5f4\uc758 \ub9c8\uc9c0\ub9c9 \ubb38\uc790\uac00 ",Object(c.b)("strong",{parentName:"li"},"\ub2e8\uc5b4 \ubb38\uc790\uac00 \uc544\ub2cc \uacbd\uc6b0"),", \ud574\ub2f9 \ubb38\uc790\uc758 \ub4b7 \ubd80\ubd84\uc5d0 \ub300\uc751\ub429\ub2c8\ub2e4."),Object(c.b)("li",{parentName:"ul"},"\ub450 \ub2e8\uc5b4 \ubb38\uc790\uc758 \uc0ac\uc774\uc5d0 \ub300\uc751\ub429\ub2c8\ub2e4."),Object(c.b)("li",{parentName:"ul"},"\ub2e8\uc5b4 \ubb38\uc790\uac00 \uc544\ub2cc \ub450 \ubb38\uc790 \uc0ac\uc774\uc5d0 \ub300\uc751\ub429\ub2c8\ub2e4."),Object(c.b)("li",{parentName:"ul"},"\ube48 \ubb38\uc790\uc5f4\uc5d0 \ub300\uc751\ub429\ub2c8\ub2e4.")),Object(c.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},"\ubb38\uc790\uc5f4\uc758 \uc2dc\uc791 \ubd80\ubd84\uacfc \ub05d \ubd80\ubd84\uc740 \ub2e8\uc5b4\uac00 \uc544\ub2cc \uac83\uc73c\ub85c \uac04\uc8fc\ub429\ub2c8\ub2e4."))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var re = /\\B../;\nre.exec(\'noonday\');\n// -> ["oo", index: 1, input: "noonday", groups: undefined]\n\nvar re = /\\B../;\nre.exec(\'!noonday\');\n// -> ["!n", index: 0, input: "!noonday", groups: undefined]\n\nvar re = /y\\B./;\nre.exec(\'possibly yesterday.\');\n// -> ["ye", index: 9, input: "possibly yesterday.", groups: undefined]\n\n\'it **th**at\'.match(/t\\B./)\n// ["th", index: 3, input: "it that", groups: undefined]\n\'i**t_**that\'.match(/t\\B./)\n// ["t_", index: 1, input: "it_that", groups: undefined]\n\'it-**th**at\'.match(/t\\B./)\n// ["th", index: 3, input: "it-that", groups: undefined]\n// -> "\ub2e8\uc5b4 \uacbd\uacc4"\ub294 \uacf5\ubc31\uacfc "-"\uc778 \uac83\uc784. \uc5b8\ub354\ubc14("_")\ub294 \ubc11\uc904\ubb38\uc790\uac00 \uc544\ub2cc\uac00\ubd04\n')),Object(c.b)("h4",{id:"assertion-compare-b-and-bigb"},"\\b\uc640 \\B \ube44\uad50"),Object(c.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(c.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://stackoverflow.com/questions/6664151/difference-between-b-and-b-in-regex"}),"https://stackoverflow.com/questions/6664151/difference-between-b-and-b-in-regex")),Object(c.b)("p",{parentName:"div"},"\\b matches the empty string at the beginning or end of a word."),Object(c.b)("p",{parentName:"div"},"\\B matches the empty string ",Object(c.b)("strong",{parentName:"p"},"not")," at the beginning or end of a word."))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var text = "**cat**mania this**cat** this**cat**maina";\n\n/*\nNow definitions,\n\n\'\\b\' finds/matches the pattern at the beginning or end of each word.\n\'\\B\' does not find/match the pattern at the beginning or end of each word.\n*/\n\n// Different Cases:\n\n// Case 1: At the beginning of each word\nresult = text.replace(/\\bcat/g, "ct");\n// -> Now, result is "**ct**mania thiscat thiscatmaina"\n\n// Case 2: At the end of each word\nresult = text.replace(/cat\\b/g, "ct");\n// -> Now, result is "catmania this**ct** thiscatmaina"\n\n// Case 3: Not in the beginning\nresult = text.replace(/\\Bcat/g, "ct");\n// -> Now, result is "catmania this**ct** this**ct**maina"\n\n// Case 4: Not in the end\nresult = text.replace(/cat\\B/g, "ct");\n// -> Now, result is "**ct**mania thiscat this**ct**maina"\n\n// Case 5: Neither beginning nor end\nresult = text.replace(/\\Bcat\\B/g, "ct");\n// -> Now, result is "catmania thiscat this**ct**maina"\n')),Object(c.b)("h3",{id:"\uae30\ud0c0-assertionsother-assertions"},"\uae30\ud0c0 assertions(Other assertions)"),Object(c.b)("p",null,Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Assertions#other_assertions"}),"MDN\ubb38\uc11c: Other assertions")),Object(c.b)("h4",{id:"assertion-other-lookahead"},"x(?=y)"),Object(c.b)("p",null,"x \ub4a4\uc5d0 y\uac00 \uc624\ub294 \ubd80\ubd84\uc744 \ucc3e\uc544\ub0b4\uac8c \ub418\uba74 x\ub9cc \ub300\uc751"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var str = \'JackSprat\';\nstr.match(/Jack(?=Sprat)/);\n// -> ["Jack", index: 0, input: "JackSprat", groups: undefined]\n\nvar str = \'JackFrost\';\nstr.match(/Jack(?=Sprat|Frost)/);\n// -> ["Jack", index: 0, input: "JackSprat", groups: undefined]\n')),Object(c.b)("h4",{id:"assertion-other-nagative-lookahead"},"x(?!y)"),Object(c.b)("p",null,"x \ub4a4\uc5d0 y\uac00 \uc624\uc9c0 \uc54a\ub294 \ubd80\ubd84\uc744 \ucc3e\uc544\ub0b4\uac8c \ub418\uba74 x\ub9cc \ub300\uc751"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"var str = 'JackFrost**Jack**Hammer';\nstr.match(/Jack(?!Sprat|Frost)/);\n// -> [\"Jack\", index: 9, input: \"JackFrostJackHammer\", groups: undefined]\n\nvar dec = '3.141';\ndec.match(/\\d+(?!\\.)/);\n// -> [\"141\", index: 2, input: \"3.141\", groups: undefined]\n// -> \"\\d+\" \ub294 '3' \ud639\uc740 '141' \uc778\ub370, \"\\.\"\uc740 \uc18c\uc218\uc810 '.'\uc744 \uac00\ub974\ud0a4\ub294 \uac83\uc778\ub370,\n// '3' \ud639\uc740 '141' \ub4a4\uc5d0 \uc18c\uc218\uc810 '.'\uc774 \ub530\ub77c\uc624\uc9c0 \uc54a\ub294 \ubd80\ubd84\uc744 \uba3c\uc800 \ucc3e\uac8c \ub418\ub294\ub370,\n// \uadf8\uac83\uc774 \ubc14\ub85c '141'\n")),Object(c.b)("h4",{id:"assertion-other-lookbehind"},"(?",Object(c.b)("span",null,"<"),"=y)x"),Object(c.b)("p",null,"x \uc55e\uc5d0 y\uac00 \uc624\ub294 \ubd80\ubd84\uc744 \ucc3e\uc544\ub0b4\uac8c \ub418\uba74 x\ub9cc \ub300\uc751"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"let oranges = ['ripe orange A ', 'green orange B', 'ripe orange C',];\n\nlet ripe_oranges = oranges.filter( fruit => fruit.match(/(?<=ripe )orange/));\nconsole.log(ripe_oranges); // [ 'ripe orange A ', 'ripe orange C' ]\n")),Object(c.b)("h4",{id:"assertion-other-nagative-lookbehind"},"(?",Object(c.b)("span",null,"<"),"!y)x"),Object(c.b)("p",null,"x \uc55e\uc5d0 y\uac00 \uc624\uc9c0 \uc54a\ub294 \ubd80\ubd84\uc744 \ucc3e\uc544\ub0b4\uac8c \ub418\uba74 x\ub9cc \ub300\uc751"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"var num = '3';\nnum.match(/(?<!-)\\d+/);\n// -> [\"3\", index: 0, input: \"3\", groups: undefined]\n\nvar num = '-3';\nnum.match(/(?<!-)\\d+/);\n// -> null\n")),Object(c.b)("h4",{id:"compare-assertion-other-lookahead-lookbehind"},"x(?=y)\uc640 (?",Object(c.b)("span",null,"<"),"=y)x \ube44\uad50"),Object(c.b)("p",null,"\ucc3e\uc73c\ub824\ub294 \ub2e8\uc5b4\uac00 \uc55e\uc5d0 \uc624\ub294 \uac83\uc744 \ucc3e\uace0 \uc2f6\uc744 \ub54c\uc778 \uc9c0, \ub4a4\uc5d0 \uc624\ub294 \uac83\uc744 \ucc3e\uace0 \uc2f6\uc740 \uc9c0\uc5d0 \ub530\ub77c \uc4f0\uc774\ub294 \uc815\uaddc\uc2dd\uc774 \ub2e4\ub984\uc744 \uc720\uc758\ud55c\ub2e4"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},"\uc55e\uc5d0 \uc624\ub294 \uac83\uc744 \ucc3e\uace0 \uc2f6\uc744 \ub54c: ",Object(c.b)("strong",{parentName:"li"},"x(?=y)")),Object(c.b)("li",{parentName:"ul"},"\ub4a4\uc5d0 \uc624\ub294 \uac83\uc744 \ucc3e\uace0 \uc2f6\uc744 \ub54c: ",Object(c.b)("strong",{parentName:"li"},"(?<=y)x"))),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var str = \'JackSprat\';\n\n// **x(?=y)**\nstr.match(/Jack(?=Sprat)/);\n// -> ["Jack", index: 0, input: "JackSprat", groups: undefined]\nstr.match(/(?=Jack)Sprat/);\n// -> null\n\n// **(?<=y)x**\nstr.match(/(?<=Jack)Sprat/);\n// -> ["Sprat", index: 4, input: "JackSprat", groups: undefined]\n')),Object(c.b)("h2",{id:"\ud50c\ub798\uadf8"},"\ud50c\ub798\uadf8"),Object(c.b)("p",null,"\ud50c\ub798\uadf8\uc758 \uc885\ub958\ub294 "),Object(c.b)("p",null,"\uc6b0\uc120 \uc790\uc8fc \uc0ac\uc6a9\ud558\ub294 \ud50c\ub798\uadf8\uc778 g, i, u\ub9cc \uc608\uc81c\ub85c\uc368\ub9cc \uc815\ub9ac \ud574 \ubcf4\ub824\uace0 \ud55c\ub2e4."),Object(c.b)("p",null,"\uc6d0\ubb38\uc740 \uc5ec\uae30 \u2192 ",Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/ko/docs/Web/JavaScript/Guide/%EC%A0%95%EA%B7%9C%EC%8B%9D#%ED%94%8C%EB%9E%98%EA%B7%B8%EB%A5%BC_%EC%82%AC%EC%9A%A9%ED%95%9C_%EA%B3%A0%EA%B8%89%EA%B2%80%EC%83%89"}),"\ud50c\ub798\uadf8\ub97c \uc0ac\uc6a9\ud55c \uace0\uae09\uac80\uc0c9")," (en: ",Object(c.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#advanced_searching_with_flags"}),"Advanced searching with flags"),")"),Object(c.b)("h3",{id:"g-\uae00\ub85c\ubc8c"},"g: \uae00\ub85c\ubc8c"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"var str = 'fooexamplefoo';\nconsole.log(str.replace(/foo/g, '')); // example\nconsole.log(str.replace(/foo/, '')); // examplefoo\n\nvar re = /\\w+\\s/g;\nvar str = 'fee fi fo fum';\nconsole.log(str.match(re)); // [\"fee \", \"fi \", \"fo \"]\n")),Object(c.b)("h3",{id:"i-\ub300\uc18c\ubb38\uc790-\uad6c\ubd84\uc5c6\uc74c"},"i: \ub300\uc18c\ubb38\uc790 \uad6c\ubd84\uc5c6\uc74c"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"var str = 'Football';\nconsole.log(/foo/i.exec(str));\n// -> [\"Foo\", index: 0, input: \"Football\", groups: undefined]\nconsole.log(/foo/i.test('Football'));\n// -> true\n\nconsole.log(/foo/.exec(str));\n// -> null\nconsole.log(/foo/.test(str));\n// -> false\n")),Object(c.b)("h3",{id:"u-\uc720\ub2c8\ucf54\ub4dc-\ucde8\uae09"},"u: \uc720\ub2c8\ucf54\ub4dc \ucde8\uae09"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'\'nay, a\ud83d\ude04n apple is on the tree\'.match(/.n../)\n// -> ["\ufffdn a", index: 7, input: "nay, a\ud83d\ude04n apple is on the tree", groups: undefined]\n\n\'nay, a\ud83d\ude04n apple is on the tree\'.match(/.n../u)\n// -> ["\ud83d\ude04n a", index: 6, input: "nay, a\ud83d\ude04n apple is on the tree", groups: undefined]\n')),Object(c.b)("h2",{id:"\uc815\uaddc\uc2dd-\uc0ac\uc6a9-\uc608\uc81c"},"\uc815\uaddc\uc2dd \uc0ac\uc6a9 \uc608\uc81c"),Object(c.b)("h3",{id:"\ud734\ub300\ud3f0\ubc88\ud638"},"\ud734\ub300\ud3f0\ubc88\ud638"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var reg = /^01([0|1|6|7|8|9])-?([0-9]{3,4})-?([0-9]{4})$/;\n\n/* case 1 */\nvar phone = \'010-0000-0000\';\n\nreg.exec(phone); // or phone.match(reg);\n// -> \uacb0\uacfc: (4)\xa0["010-0000-0000", "0", "0000", "0000", index: 0, input: "010-0000-0000", groups: undefined]\nreg.test(phone);\n// -> \uacb0\uacfc: true\n\n/* case 2 */\nvar phone = \'01000000000\';\n\nreg.exec(phone); // or phone.match(reg);\n// -> \uacb0\uacfc: (4)\xa0["01000000000", "0", "0000", "0000", index: 0, input: "01000000000", groups: undefined]\nreg.test(phone);\n// -> \uacb0\uacfc: true\n')),Object(c.b)("h3",{id:"\uad6d\ub0b4-\uc720\uc120-\uc804\ud654\ubc88\ud638"},"\uad6d\ub0b4 \uc720\uc120 \uc804\ud654\ubc88\ud638"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'var reg = /^(02|0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/\nvar phone = \'051-508-9200\'; // <- \ubd80\uc0b0\uc885\ud569\ubc84\uc2a4\ud130\ubbf8\ub110\n\nreg.exec(phone); // or phone.match(reg);\n// -> \uacb0\uacfc: (4)\xa0["051-508-9200", "051", "508", "9200", index: 0, input: "051-508-9200", groups: undefined]\nreg.test(phone);\n// -> \uacb0\uacfc: true\n')),Object(c.b)("h3",{id:"\ud2b9\uc218\ubb38\uc790-\ubc1c\ub77c\ub0b4\uae30"},"\ud2b9\uc218\ubb38\uc790 \ubc1c\ub77c\ub0b4\uae30"),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),"var pattern = /[^(\uac00-\ud7a3\u3131-\u314e\u314f-\u3163a-zA-Z0-9|\\s|/|.|,|\\-)]/gi;\xa0\xa0 // \ud2b9\uc218\ubb38\uc790 \uc81c\uac70 \uacf5\ubc31\uc740 \ubb34\uc2dc\nvar content = 'i wa!nt!!@#!@#!@ fr#e#!!@edom!@# and!$ peacef@#!@#ul world';\ncontent.replace(pattern, '')\n\n// \uacb0\uacfc: \"i want freedom and peaceful world\"\n")),Object(c.b)("h3",{id:"\uae30\ubcf8\uc22b\uc790\ub97c--\uac00-\ub4e4\uc5b4\uac04-\ud1b5\ud654\ud615\ud0dc\ub85c-\ubc14\uafb8\uae30"},'\uae30\ubcf8\uc22b\uc790\ub97c "," \uac00 \ub4e4\uc5b4\uac04 \ud1b5\ud654\ud615\ud0dc\ub85c \ubc14\uafb8\uae30'),Object(c.b)("pre",null,Object(c.b)("code",Object(n.a)({parentName:"pre"},{className:"language-jsx"}),'\'100000.912123123\'.replace(/(\\d)(?=(\\d{3})+\\.)/g, \'$&,\');\n// 100,000.912123123\n// ("$&"\ub294 \uad04\ud638\ub85c \ubb36\uc5ec\uc11c \uc77c\uce58\ud558\ub294 \uc804\uccb4 \ubb38\uc790\uc5f4\uc744 \uc758\ubbf8)\n\n// \ud30c\ud5e4\uce58\uae30\n\'100000.912123123\'.match(/\\d+(?=(\\d{3})+\\.)/)\n// -> (2)\xa0["100", "000", index: 0, input: "100000.912123123", groups: undefined]\n')),Object(c.b)(i.a.Google,{client:"undefined",slot:"undefined",style:{display:"block"},format:"auto",responsive:"true"}),Object(c.b)(b.a,{mdxType:"Comment"}))}u.isMDXComponent=!0}}]);