<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>텍스트 | JDW BLOG</title>
    <link>https://www.jdwblog.com/tag/%ED%85%8D%EC%8A%A4%ED%8A%B8/</link>
      <atom:link href="https://www.jdwblog.com/tag/%ED%85%8D%EC%8A%A4%ED%8A%B8/index.xml" rel="self" type="application/rss+xml" />
    <description>텍스트</description>
    <generator>Wowchemy (https://wowchemy.com)</generator><language>ko</language><copyright>© 2026. JDW all rights reserved.</copyright><lastBuildDate>Sat, 03 Oct 2020 00:00:00 +0000</lastBuildDate>
    <image>
      <url>https://www.jdwblog.com/media/icon_hua25d9a1a07874235ea074645b87e53ff_12380_512x512_fill_lanczos_center_2.png</url>
      <title>텍스트</title>
      <link>https://www.jdwblog.com/tag/%ED%85%8D%EC%8A%A4%ED%8A%B8/</link>
    </image>
    
    <item>
      <title>[R] stringr 패키지를 사용한 정규표현식</title>
      <link>https://www.jdwblog.com/post/regexwithstringr/</link>
      <pubDate>Sat, 03 Oct 2020 00:00:00 +0000</pubDate>
      <guid>https://www.jdwblog.com/post/regexwithstringr/</guid>
      <description>&lt;img src=&#34;images/stringr_logo.png&#34; alt=&#34;&#34; width=&#34;50%&#34;/&gt;
&lt;p&gt; 이전 장에서 R에서 사용되는 정규표현식에 대해 알아보았었는데요. 오늘은 정규표현식을 텍스트 데이터를 처리할때 사용하는 패키지인 &lt;strong&gt;&lt;code&gt;stringr&lt;/code&gt;&lt;/strong&gt; 과 함께 사용하는 방법에 대해 알아보도록 하겠습니다.&lt;/p&gt;



&lt;h1 id=&#34;stringr&#34;&gt;stringr&lt;a href=&#34;#stringr&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;  &lt;strong&gt;&lt;code&gt;stringr&lt;/code&gt;&lt;/strong&gt; 패키지는 Rstudio의 Hadley Wickham이 개발한 패키지입니다. &lt;strong&gt;&lt;code&gt;dplyr&lt;/code&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;code&gt;ggplot2&lt;/code&gt;&lt;/strong&gt; 등과 같이 데이터를 깔끔한(tidy) 방식으로 처리하는것을 지향하는 &lt;strong&gt;&lt;code&gt;tidyverse&lt;/code&gt;&lt;/strong&gt; 패키지군에 속해 있으며, 그 중 &lt;strong&gt;&lt;code&gt;stringr&lt;/code&gt;&lt;/strong&gt; 은 문자열 처리에 특화된 패키지입니다. &amp;lsquo;string&amp;rsquo;의 준말인 &lt;code&gt;str_&lt;/code&gt;이 함수 머릿말에 항상 등장하는 것이 특징입니다.&lt;/p&gt;
&lt;p&gt;  &lt;strong&gt;&lt;code&gt;stringr&lt;/code&gt;&lt;/strong&gt; 패키지의 주요 기능을 아래와 같이 분류하였고 각 경우에 맞는 상황을 가정하여 알아보도록 하겠습니다.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;#%ec%9d%bc%ec%b9%98&#34;&gt;1. 특정 패턴과 &lt;strong&gt;&amp;lsquo;일치&amp;rsquo;&lt;/strong&gt;&lt;/a&gt; &lt;br&gt;
&lt;a href=&#34;#%ec%b9%b4%ec%9a%b4%ed%8c%85&#34;&gt;2. 특정 패턴의 &lt;strong&gt;&amp;lsquo;카운팅&amp;rsquo;&lt;/strong&gt;&lt;/a&gt; &lt;br&gt;
&lt;a href=&#34;#%ed%8f%ac%ed%95%a8&#34;&gt;3. 특정 패턴이 &lt;strong&gt;&amp;lsquo;포함&amp;rsquo;&lt;/strong&gt; 된 경우&lt;/a&gt; &lt;br&gt;
&lt;a href=&#34;#%ec%9c%84%ec%b9%98&#34;&gt;4. 특정 패턴의 &lt;strong&gt;&amp;lsquo;위치&amp;rsquo;&lt;/strong&gt; 를 반환&lt;/a&gt; &lt;br&gt;
&lt;a href=&#34;#%eb%b0%94%ea%be%b8%ea%b8%b0&#34;&gt;5. 특정 패턴을 새로운 것으로 &lt;strong&gt;&amp;lsquo;바꾸는&amp;rsquo;&lt;/strong&gt; 경우&lt;/a&gt; &lt;br&gt;
&lt;a href=&#34;#%eb%82%98%eb%88%84%ea%b8%b0&#34;&gt;6. 특정 패턴을 기준으로 &lt;strong&gt;&amp;lsquo;나누는&amp;rsquo;&lt;/strong&gt; 경우&lt;/a&gt;&lt;br&gt;&lt;/p&gt;



&lt;h2 id=&#34;예제-문장&#34;&gt;예제 문장&lt;a href=&#34;#%ec%98%88%ec%a0%9c-%eb%ac%b8%ec%9e%a5&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt; 연습용으로 사용할 문장은 stringr 패키지에 내장되어 있는 &lt;code&gt;sentence&lt;/code&gt; 데이터를 사용하겠습니다. &lt;code&gt;sentence&lt;/code&gt;는 총 1000문장으로 구성되어 있는데, 문장 전체를 사용할 필요가 없으므로 10문장 정도만을 추려서 사용하도록 하겠습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;regex_sentences &amp;lt;- stringr::sentences[1:10] # 예제용 문장 생성

regex_sentences
#&amp;gt;  [1] &amp;quot;The birch canoe slid on the smooth planks.&amp;quot; 
#&amp;gt;  [2] &amp;quot;Glue the sheet to the dark blue background.&amp;quot;
#&amp;gt;  [3] &amp;quot;It&#39;s easy to tell the depth of a well.&amp;quot;     
#&amp;gt;  [4] &amp;quot;These days a chicken leg is a rare dish.&amp;quot;   
#&amp;gt;  [5] &amp;quot;Rice is often served in round bowls.&amp;quot;       
#&amp;gt;  [6] &amp;quot;The juice of lemons makes fine punch.&amp;quot;      
#&amp;gt;  [7] &amp;quot;The box was thrown beside the parked truck.&amp;quot;
#&amp;gt;  [8] &amp;quot;The hogs were fed chopped corn and garbage.&amp;quot;
#&amp;gt;  [9] &amp;quot;Four hours of steady work faced us.&amp;quot;        
#&amp;gt; [10] &amp;quot;Large size in stockings is hard to sell.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;



&lt;h3 id=&#34;일치&#34;&gt;일치&lt;a href=&#34;#%ec%9d%bc%ec%b9%98&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt; &lt;code&gt;str_detect()&lt;/code&gt;함수는 특정 문자 혹은 패턴(정규표현식)과 일치하는 경우를 찾을때 사용하며, 실행 결과로서 boolean(참, 거짓)을 반환합니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_detect(regex_sentences, &#39;[aeiou]&#39;) # 알파벳 모음 &#39;a&#39; or &#39;e&#39; or &#39;i&#39; or &#39;o&#39; or &#39;u&#39;가 있을 경우 TRUE
#&amp;gt;  [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_detect(regex_sentences, &#39;[easy]&#39;)  # 알파벳 &#39;e&#39; or &#39;a&#39; or &#39;s&#39; or &#39;y&#39;가 있을 경우 TRUE 
#&amp;gt;  [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_detect(regex_sentences, &#39;(easy)&#39;)  # 알파벳 &#39;easy&#39;가 있을 경우 TRUE 
#&amp;gt;  [1] FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt; &lt;code&gt;str_extract()&lt;/code&gt;함수는 특정 문자 혹은 패턴(정규표현식)과 일치하는 경우, 그것을 반환합니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_extract(regex_sentences, &#39;[aeiou]&#39;) # &#39;a&#39; or &#39;e&#39; or &#39;i&#39; or &#39;o&#39; or &#39;u&#39; 글자가 존재하면 그것을 반환 
#&amp;gt;  [1] &amp;quot;e&amp;quot; &amp;quot;u&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;a&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_extract(regex_sentences, &#39;[:punct:]&#39;) # 문장부호가 존재하면 그것을 반환 
#&amp;gt;  [1] &amp;quot;.&amp;quot; &amp;quot;.&amp;quot; &amp;quot;&#39;&amp;quot; &amp;quot;.&amp;quot; &amp;quot;.&amp;quot; &amp;quot;.&amp;quot; &amp;quot;.&amp;quot; &amp;quot;.&amp;quot; &amp;quot;.&amp;quot; &amp;quot;.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; 함수는 조건에 일치하는 결과를 반환하였는데요. 자세히 보면 조건에 일치한 것이 여러개 있음에도 불구하고 오직 최초 값만을 반환하는 것을 볼 수 있습니다. 그렇다면 조건에 일치하는 모든 값을 찾고자 할 땐 어떻게 해야할까요? 바로 &lt;code&gt;str_extract_all()&lt;/code&gt; 함수를 사용하면 됩니다. &lt;strong&gt;&lt;code&gt;stringr&lt;/code&gt;&lt;/strong&gt; 패키지 함수 중 몇몇의 함수는 함수 말미에 &lt;code&gt;_all&lt;/code&gt;이 붙는 함수들이 있습니다. 이들 함수들은 조건에 맞는 모든 값을 반환하는 특징이 있습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_extract_all(regex_sentences, &#39;[aeiou]&#39;)
#&amp;gt; [[1]]
#&amp;gt;  [1] &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;a&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;o&amp;quot; &amp;quot;a&amp;quot;
#&amp;gt; 
#&amp;gt; [[2]]
#&amp;gt;  [1] &amp;quot;u&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;a&amp;quot; &amp;quot;u&amp;quot; &amp;quot;e&amp;quot; &amp;quot;a&amp;quot; &amp;quot;o&amp;quot; &amp;quot;u&amp;quot;
#&amp;gt; 
#&amp;gt; [[3]]
#&amp;gt; [1] &amp;quot;e&amp;quot; &amp;quot;a&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;a&amp;quot; &amp;quot;e&amp;quot;
#&amp;gt; 
#&amp;gt; [[4]]
#&amp;gt;  [1] &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;a&amp;quot; &amp;quot;a&amp;quot; &amp;quot;i&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;a&amp;quot; &amp;quot;a&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot;
#&amp;gt; 
#&amp;gt; [[5]]
#&amp;gt;  [1] &amp;quot;i&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;o&amp;quot; &amp;quot;u&amp;quot; &amp;quot;o&amp;quot;
#&amp;gt; 
#&amp;gt; [[6]]
#&amp;gt;  [1] &amp;quot;e&amp;quot; &amp;quot;u&amp;quot; &amp;quot;i&amp;quot; &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;a&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;e&amp;quot; &amp;quot;u&amp;quot;
#&amp;gt; 
#&amp;gt; [[7]]
#&amp;gt;  [1] &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;a&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;a&amp;quot; &amp;quot;e&amp;quot; &amp;quot;u&amp;quot;
#&amp;gt; 
#&amp;gt; [[8]]
#&amp;gt;  [1] &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;o&amp;quot; &amp;quot;a&amp;quot; &amp;quot;a&amp;quot; &amp;quot;a&amp;quot; &amp;quot;e&amp;quot;
#&amp;gt; 
#&amp;gt; [[9]]
#&amp;gt;  [1] &amp;quot;o&amp;quot; &amp;quot;u&amp;quot; &amp;quot;o&amp;quot; &amp;quot;u&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot; &amp;quot;a&amp;quot; &amp;quot;o&amp;quot; &amp;quot;a&amp;quot; &amp;quot;e&amp;quot; &amp;quot;u&amp;quot;
#&amp;gt; 
#&amp;gt; [[10]]
#&amp;gt;  [1] &amp;quot;a&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;e&amp;quot; &amp;quot;i&amp;quot; &amp;quot;o&amp;quot; &amp;quot;i&amp;quot; &amp;quot;i&amp;quot; &amp;quot;a&amp;quot; &amp;quot;o&amp;quot; &amp;quot;e&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_extract_all(regex_sentences, &#39;[:punct:]&#39;)
#&amp;gt; [[1]]
#&amp;gt; [1] &amp;quot;.&amp;quot;
#&amp;gt; 
#&amp;gt; [[2]]
#&amp;gt; [1] &amp;quot;.&amp;quot;
#&amp;gt; 
#&amp;gt; [[3]]
#&amp;gt; [1] &amp;quot;&#39;&amp;quot; &amp;quot;.&amp;quot;
#&amp;gt; 
#&amp;gt; [[4]]
#&amp;gt; [1] &amp;quot;.&amp;quot;
#&amp;gt; 
#&amp;gt; [[5]]
#&amp;gt; [1] &amp;quot;.&amp;quot;
#&amp;gt; 
#&amp;gt; [[6]]
#&amp;gt; [1] &amp;quot;.&amp;quot;
#&amp;gt; 
#&amp;gt; [[7]]
#&amp;gt; [1] &amp;quot;.&amp;quot;
#&amp;gt; 
#&amp;gt; [[8]]
#&amp;gt; [1] &amp;quot;.&amp;quot;
#&amp;gt; 
#&amp;gt; [[9]]
#&amp;gt; [1] &amp;quot;.&amp;quot;
#&amp;gt; 
#&amp;gt; [[10]]
#&amp;gt; [1] &amp;quot;.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;code&gt;str_extract_all()&lt;/code&gt; 함수의 결과, 조건에 부합하는 모든 값이 list 형으로 반환된 것을 볼 수 있습니다.&lt;/p&gt;



&lt;h3 id=&#34;카운팅&#34;&gt;카운팅&lt;a href=&#34;#%ec%b9%b4%ec%9a%b4%ed%8c%85&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt; &lt;code&gt;str_count()&lt;/code&gt;함수는 특정 문자 혹은 패턴(정규표현식)과 일치하는 경우를 계산합니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_count(regex_sentences, &#39;[aeiou]&#39;) # &#39;a&#39; or &#39;e&#39; or &#39;i&#39; or &#39;o&#39; or &#39;u&#39; 문자의 개수를 반환 
#&amp;gt;  [1] 11 13  9 12 11 12 11 12 11 11
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_count(regex_sentences, &#39;^(The)&#39;) # 시작이 &#39;The&#39;인 경우를 셈 
#&amp;gt;  [1] 1 0 0 1 0 1 1 1 0 0
&lt;/code&gt;&lt;/pre&gt;



&lt;h3 id=&#34;포함&#34;&gt;포함&lt;a href=&#34;#%ed%8f%ac%ed%95%a8&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt; &lt;code&gt;str_subset()&lt;/code&gt;함수는 특정 문자 혹은 패턴(정규표현식)이 포함된 경우를 반환합니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_subset(regex_sentences, &#39;[aeiou]&#39;) # &#39;a&#39; or &#39;e&#39; or &#39;i&#39; or &#39;o&#39; or &#39;u&#39; 문자가 포함된 경우를 반환 
#&amp;gt;  [1] &amp;quot;The birch canoe slid on the smooth planks.&amp;quot; 
#&amp;gt;  [2] &amp;quot;Glue the sheet to the dark blue background.&amp;quot;
#&amp;gt;  [3] &amp;quot;It&#39;s easy to tell the depth of a well.&amp;quot;     
#&amp;gt;  [4] &amp;quot;These days a chicken leg is a rare dish.&amp;quot;   
#&amp;gt;  [5] &amp;quot;Rice is often served in round bowls.&amp;quot;       
#&amp;gt;  [6] &amp;quot;The juice of lemons makes fine punch.&amp;quot;      
#&amp;gt;  [7] &amp;quot;The box was thrown beside the parked truck.&amp;quot;
#&amp;gt;  [8] &amp;quot;The hogs were fed chopped corn and garbage.&amp;quot;
#&amp;gt;  [9] &amp;quot;Four hours of steady work faced us.&amp;quot;        
#&amp;gt; [10] &amp;quot;Large size in stockings is hard to sell.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_subset(regex_sentences, &#39;^(The)&#39;)  # 시작이 &#39;The&#39;인 문장을 반환
#&amp;gt; [1] &amp;quot;The birch canoe slid on the smooth planks.&amp;quot; 
#&amp;gt; [2] &amp;quot;These days a chicken leg is a rare dish.&amp;quot;   
#&amp;gt; [3] &amp;quot;The juice of lemons makes fine punch.&amp;quot;      
#&amp;gt; [4] &amp;quot;The box was thrown beside the parked truck.&amp;quot;
#&amp;gt; [5] &amp;quot;The hogs were fed chopped corn and garbage.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_subset(regex_sentences, &#39;p[:alpha:]{1,}\\.$&#39;) # &#39;p&#39;뒤에 알파벳이 한번 이상 나오면서 마침표로 끝나는 경우 
#&amp;gt; [1] &amp;quot;The birch canoe slid on the smooth planks.&amp;quot;
#&amp;gt; [2] &amp;quot;The juice of lemons makes fine punch.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;



&lt;h3 id=&#34;위치&#34;&gt;위치&lt;a href=&#34;#%ec%9c%84%ec%b9%98&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt; &lt;code&gt;str_locate()&lt;/code&gt;함수는 특정 문자 혹은 패턴(정규표현식)에 맞는 경우의 시작 지점과 끝 지점을 반환합니다. R에 기본적으로 내장되어 있는 영어 소문자 데이터인 &lt;code&gt;letters&lt;/code&gt;를 통해 알아보겠습니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;letters
#&amp;gt;  [1] &amp;quot;a&amp;quot; &amp;quot;b&amp;quot; &amp;quot;c&amp;quot; &amp;quot;d&amp;quot; &amp;quot;e&amp;quot; &amp;quot;f&amp;quot; &amp;quot;g&amp;quot; &amp;quot;h&amp;quot; &amp;quot;i&amp;quot; &amp;quot;j&amp;quot; &amp;quot;k&amp;quot; &amp;quot;l&amp;quot; &amp;quot;m&amp;quot; &amp;quot;n&amp;quot; &amp;quot;o&amp;quot; &amp;quot;p&amp;quot; &amp;quot;q&amp;quot; &amp;quot;r&amp;quot; &amp;quot;s&amp;quot;
#&amp;gt; [20] &amp;quot;t&amp;quot; &amp;quot;u&amp;quot; &amp;quot;v&amp;quot; &amp;quot;w&amp;quot; &amp;quot;x&amp;quot; &amp;quot;y&amp;quot; &amp;quot;z&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; 패턴의 위치를 찾기 위해선 하나로 묶인 데이터가 필요하므로 &lt;code&gt;str_c()&lt;/code&gt; 함수를 사용하여 하나의 벡터로 묶었습니다. (&lt;code&gt;str_c()&lt;/code&gt;함수는 __&lt;code&gt;stringr&lt;/code&gt;__패키지의 문자를 결합하는 함수. R의 내장함수인 &lt;code&gt;paste()&lt;/code&gt;와 동일하게 동작)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;letters &amp;lt;- str_c(letters, collapse = &#39;&#39;);

letters # 하나의 벡터값으로 변환 
#&amp;gt; [1] &amp;quot;abcdefghijklmnopqrstuvwxyz&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_locate(letters, &#39;[a-z]+&#39;) # &#39;a&#39;부터 &#39;z&#39; 까지의 문자가 한개 이상 나오는 경우의 시작과 끝을 반환 
#&amp;gt;      start end
#&amp;gt; [1,]     1  26
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_locate(letters, &#39;^[a][a-z]+[z]$&#39;) # 시작이 &#39;a&#39;이며, 바로 뒤에 &#39;a&#39; 부터 &#39;z&#39;까지의 문자 중 하나가 한번 이상 나오며, 끝이 &#39;z&#39;인 경우의 시작 지점과 끝 지점을 반환.
#&amp;gt;      start end
#&amp;gt; [1,]     1  26
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_locate(letters, &#39;^[a-z][a-z]+$&#39;) # 시작이 &#39;a&#39; 부터 &#39;z&#39; 까지의 문자 중 하나이며, 끝이 &#39;a&#39; 부터 &#39;z&#39; 까지의 문자 중 하나인 경우의 시작 지점과 끝 지점.
#&amp;gt;      start end
#&amp;gt; [1,]     1  26
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_locate(letters, &#39;(abcde)&#39;) # &#39;abcde&#39;의 시작 지점과 끝 지점을 반환 
#&amp;gt;      start end
#&amp;gt; [1,]     1   5
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_locate(letters, &#39;(xyz)&#39;) # &#39;xyz&#39;의 시작 지점과 끝 지점을 반환  
#&amp;gt;      start end
#&amp;gt; [1,]    24  26
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;code&gt;str_locate_all()&lt;/code&gt;함수를 통해 조건에 맞는 모든 값의 위치를 추출할 수 있습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_locate(letters, &#39;[aeiou][^aeiou]+&#39;) # &#39;a&#39; or &#39;e&#39; or &#39;i&#39; or &#39;o&#39; or &#39;u&#39;문자 뒤에 &#39;a&#39; or &#39;e&#39; or &#39;i&#39; or &#39;o&#39; or &#39;u&#39; 문자가 아닌 문자가 하나 이상 나오는 최초 경우의 시작 지점과 끝 지점을 반환 
#&amp;gt;      start end
#&amp;gt; [1,]     1   4
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_locate_all(letters, &#39;[aeiou][^aeiou]+&#39;) # &#39;a&#39; or &#39;e&#39; or &#39;i&#39; or &#39;o&#39; or &#39;u&#39;문자 뒤에 &#39;a&#39; or &#39;e&#39; or &#39;i&#39; or &#39;o&#39; or &#39;u&#39; 문자가 아닌 문자가 하나 이상 나오는 모든 경우의 시작 지점과 끝 지점을 반환 
#&amp;gt; [[1]]
#&amp;gt;      start end
#&amp;gt; [1,]     1   4
#&amp;gt; [2,]     5   8
#&amp;gt; [3,]     9  14
#&amp;gt; [4,]    15  20
#&amp;gt; [5,]    21  26
&lt;/code&gt;&lt;/pre&gt;



&lt;h3 id=&#34;바꾸기&#34;&gt;바꾸기&lt;a href=&#34;#%eb%b0%94%ea%be%b8%ea%b8%b0&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt; &lt;code&gt;str_replace()&lt;/code&gt;는 특정 문자 혹은 패턴(정규표현식)에 맞는 경우를 새로운 문자로 바꾸는 함수입니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_replace(regex_sentences, &#39;k&#39;, &amp;quot;&#39;K&#39;&amp;quot;) # 최초로 매칭되는 문자 k를 &#39;K&#39;로 변환  
#&amp;gt;  [1] &amp;quot;The birch canoe slid on the smooth plan&#39;K&#39;s.&amp;quot; 
#&amp;gt;  [2] &amp;quot;Glue the sheet to the dar&#39;K&#39; blue background.&amp;quot;
#&amp;gt;  [3] &amp;quot;It&#39;s easy to tell the depth of a well.&amp;quot;       
#&amp;gt;  [4] &amp;quot;These days a chic&#39;K&#39;en leg is a rare dish.&amp;quot;   
#&amp;gt;  [5] &amp;quot;Rice is often served in round bowls.&amp;quot;         
#&amp;gt;  [6] &amp;quot;The juice of lemons ma&#39;K&#39;es fine punch.&amp;quot;      
#&amp;gt;  [7] &amp;quot;The box was thrown beside the par&#39;K&#39;ed truck.&amp;quot;
#&amp;gt;  [8] &amp;quot;The hogs were fed chopped corn and garbage.&amp;quot;  
#&amp;gt;  [9] &amp;quot;Four hours of steady wor&#39;K&#39; faced us.&amp;quot;        
#&amp;gt; [10] &amp;quot;Large size in stoc&#39;K&#39;ings is hard to sell.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_replace(regex_sentences, &#39;\\.&#39;, &#39;\\?&#39;) # 최초로 매칭되는 마침표를 물음표로 변환 
#&amp;gt;  [1] &amp;quot;The birch canoe slid on the smooth planks?&amp;quot; 
#&amp;gt;  [2] &amp;quot;Glue the sheet to the dark blue background?&amp;quot;
#&amp;gt;  [3] &amp;quot;It&#39;s easy to tell the depth of a well?&amp;quot;     
#&amp;gt;  [4] &amp;quot;These days a chicken leg is a rare dish?&amp;quot;   
#&amp;gt;  [5] &amp;quot;Rice is often served in round bowls?&amp;quot;       
#&amp;gt;  [6] &amp;quot;The juice of lemons makes fine punch?&amp;quot;      
#&amp;gt;  [7] &amp;quot;The box was thrown beside the parked truck?&amp;quot;
#&amp;gt;  [8] &amp;quot;The hogs were fed chopped corn and garbage?&amp;quot;
#&amp;gt;  [9] &amp;quot;Four hours of steady work faced us?&amp;quot;        
#&amp;gt; [10] &amp;quot;Large size in stockings is hard to sell?&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; 마찬가지로 &lt;code&gt;str_replace_all()&lt;/code&gt;함수를 통해 조건에 맞는 모든 값을 바꿀 수 있습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_replace(regex_sentences, &#39;[:alpha:]{1,}&#39;, &#39;word&#39;) # 최초로 매칭되는 알파뱃이 한개 이상인 경우를 &#39;word&#39;로 변환 
#&amp;gt;  [1] &amp;quot;word birch canoe slid on the smooth planks.&amp;quot; 
#&amp;gt;  [2] &amp;quot;word the sheet to the dark blue background.&amp;quot; 
#&amp;gt;  [3] &amp;quot;word&#39;s easy to tell the depth of a well.&amp;quot;    
#&amp;gt;  [4] &amp;quot;word days a chicken leg is a rare dish.&amp;quot;     
#&amp;gt;  [5] &amp;quot;word is often served in round bowls.&amp;quot;        
#&amp;gt;  [6] &amp;quot;word juice of lemons makes fine punch.&amp;quot;      
#&amp;gt;  [7] &amp;quot;word box was thrown beside the parked truck.&amp;quot;
#&amp;gt;  [8] &amp;quot;word hogs were fed chopped corn and garbage.&amp;quot;
#&amp;gt;  [9] &amp;quot;word hours of steady work faced us.&amp;quot;         
#&amp;gt; [10] &amp;quot;word size in stockings is hard to sell.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_replace_all(regex_sentences, &#39;[:alpha:]{1,}&#39;, &#39;word&#39;) # 알파뱃이 한개 이상인 모든 값을 &#39;word&#39;라는 단어로 변환 
#&amp;gt;  [1] &amp;quot;word word word word word word word word.&amp;quot;          
#&amp;gt;  [2] &amp;quot;word word word word word word word word.&amp;quot;          
#&amp;gt;  [3] &amp;quot;word&#39;word word word word word word word word word.&amp;quot;
#&amp;gt;  [4] &amp;quot;word word word word word word word word word.&amp;quot;     
#&amp;gt;  [5] &amp;quot;word word word word word word word.&amp;quot;               
#&amp;gt;  [6] &amp;quot;word word word word word word word.&amp;quot;               
#&amp;gt;  [7] &amp;quot;word word word word word word word word.&amp;quot;          
#&amp;gt;  [8] &amp;quot;word word word word word word word word.&amp;quot;          
#&amp;gt;  [9] &amp;quot;word word word word word word word.&amp;quot;               
#&amp;gt; [10] &amp;quot;word word word word word word word word.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_replace(regex_sentences, &#39;[:space:]&#39;, &#39;&#39;) # 최초로 매칭되는 띄어쓰기를 공백으로 변환 
#&amp;gt;  [1] &amp;quot;Thebirch canoe slid on the smooth planks.&amp;quot; 
#&amp;gt;  [2] &amp;quot;Gluethe sheet to the dark blue background.&amp;quot;
#&amp;gt;  [3] &amp;quot;It&#39;seasy to tell the depth of a well.&amp;quot;     
#&amp;gt;  [4] &amp;quot;Thesedays a chicken leg is a rare dish.&amp;quot;   
#&amp;gt;  [5] &amp;quot;Riceis often served in round bowls.&amp;quot;       
#&amp;gt;  [6] &amp;quot;Thejuice of lemons makes fine punch.&amp;quot;      
#&amp;gt;  [7] &amp;quot;Thebox was thrown beside the parked truck.&amp;quot;
#&amp;gt;  [8] &amp;quot;Thehogs were fed chopped corn and garbage.&amp;quot;
#&amp;gt;  [9] &amp;quot;Fourhours of steady work faced us.&amp;quot;        
#&amp;gt; [10] &amp;quot;Largesize in stockings is hard to sell.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_replace_all(regex_sentences, &#39;[:space:]&#39;, &#39;&#39;) # 매칭되는 모든 띄어쓰기를 공백으로 변환 
#&amp;gt;  [1] &amp;quot;Thebirchcanoeslidonthesmoothplanks.&amp;quot; 
#&amp;gt;  [2] &amp;quot;Gluethesheettothedarkbluebackground.&amp;quot;
#&amp;gt;  [3] &amp;quot;It&#39;seasytotellthedepthofawell.&amp;quot;      
#&amp;gt;  [4] &amp;quot;Thesedaysachickenlegisararedish.&amp;quot;    
#&amp;gt;  [5] &amp;quot;Riceisoftenservedinroundbowls.&amp;quot;      
#&amp;gt;  [6] &amp;quot;Thejuiceoflemonsmakesfinepunch.&amp;quot;     
#&amp;gt;  [7] &amp;quot;Theboxwasthrownbesidetheparkedtruck.&amp;quot;
#&amp;gt;  [8] &amp;quot;Thehogswerefedchoppedcornandgarbage.&amp;quot;
#&amp;gt;  [9] &amp;quot;Fourhoursofsteadyworkfacedus.&amp;quot;       
#&amp;gt; [10] &amp;quot;Largesizeinstockingsishardtosell.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;



&lt;h3 id=&#34;나누기&#34;&gt;나누기&lt;a href=&#34;#%eb%82%98%eb%88%84%ea%b8%b0&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt; &lt;code&gt;str_split()&lt;/code&gt;는 특정 문자 혹은 패턴(정규표현식)을 기준으로 값을 나누는 함수입니다. 이때 기준이된 문자 혹은 패턴은 제거됩니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_split(regex_sentences, &#39;[:upper:]&#39;) # 대문자를 기준으로 분절 
#&amp;gt; [[1]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                         
#&amp;gt; [2] &amp;quot;he birch canoe slid on the smooth planks.&amp;quot;
#&amp;gt; 
#&amp;gt; [[2]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                          
#&amp;gt; [2] &amp;quot;lue the sheet to the dark blue background.&amp;quot;
#&amp;gt; 
#&amp;gt; [[3]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                     
#&amp;gt; [2] &amp;quot;t&#39;s easy to tell the depth of a well.&amp;quot;
#&amp;gt; 
#&amp;gt; [[4]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                       
#&amp;gt; [2] &amp;quot;hese days a chicken leg is a rare dish.&amp;quot;
#&amp;gt; 
#&amp;gt; [[5]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                    &amp;quot;ice is often served in round bowls.&amp;quot;
#&amp;gt; 
#&amp;gt; [[6]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                    
#&amp;gt; [2] &amp;quot;he juice of lemons makes fine punch.&amp;quot;
#&amp;gt; 
#&amp;gt; [[7]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                          
#&amp;gt; [2] &amp;quot;he box was thrown beside the parked truck.&amp;quot;
#&amp;gt; 
#&amp;gt; [[8]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                          
#&amp;gt; [2] &amp;quot;he hogs were fed chopped corn and garbage.&amp;quot;
#&amp;gt; 
#&amp;gt; [[9]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                   &amp;quot;our hours of steady work faced us.&amp;quot;
#&amp;gt; 
#&amp;gt; [[10]]
#&amp;gt; [1] &amp;quot;&amp;quot;                                       
#&amp;gt; [2] &amp;quot;arge size in stockings is hard to sell.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_split(regex_sentences, &#39;\\b&#39;) # 문자의 바운더리를 기준으로 분절 
#&amp;gt; [[1]]
#&amp;gt;  [1] &amp;quot;&amp;quot;       &amp;quot;The&amp;quot;    &amp;quot; &amp;quot;      &amp;quot;birch&amp;quot;  &amp;quot; &amp;quot;      &amp;quot;canoe&amp;quot;  &amp;quot; &amp;quot;      &amp;quot;slid&amp;quot;  
#&amp;gt;  [9] &amp;quot; &amp;quot;      &amp;quot;on&amp;quot;     &amp;quot; &amp;quot;      &amp;quot;the&amp;quot;    &amp;quot; &amp;quot;      &amp;quot;smooth&amp;quot; &amp;quot; &amp;quot;      &amp;quot;planks&amp;quot;
#&amp;gt; [17] &amp;quot;.&amp;quot;     
#&amp;gt; 
#&amp;gt; [[2]]
#&amp;gt;  [1] &amp;quot;&amp;quot;           &amp;quot;Glue&amp;quot;       &amp;quot; &amp;quot;          &amp;quot;the&amp;quot;        &amp;quot; &amp;quot;         
#&amp;gt;  [6] &amp;quot;sheet&amp;quot;      &amp;quot; &amp;quot;          &amp;quot;to&amp;quot;         &amp;quot; &amp;quot;          &amp;quot;the&amp;quot;       
#&amp;gt; [11] &amp;quot; &amp;quot;          &amp;quot;dark&amp;quot;       &amp;quot; &amp;quot;          &amp;quot;blue&amp;quot;       &amp;quot; &amp;quot;         
#&amp;gt; [16] &amp;quot;background&amp;quot; &amp;quot;.&amp;quot;         
#&amp;gt; 
#&amp;gt; [[3]]
#&amp;gt;  [1] &amp;quot;&amp;quot;      &amp;quot;It&amp;quot;    &amp;quot;&#39;&amp;quot;     &amp;quot;s&amp;quot;     &amp;quot; &amp;quot;     &amp;quot;easy&amp;quot;  &amp;quot; &amp;quot;     &amp;quot;to&amp;quot;    &amp;quot; &amp;quot;    
#&amp;gt; [10] &amp;quot;tell&amp;quot;  &amp;quot; &amp;quot;     &amp;quot;the&amp;quot;   &amp;quot; &amp;quot;     &amp;quot;depth&amp;quot; &amp;quot; &amp;quot;     &amp;quot;of&amp;quot;    &amp;quot; &amp;quot;     &amp;quot;a&amp;quot;    
#&amp;gt; [19] &amp;quot; &amp;quot;     &amp;quot;well&amp;quot;  &amp;quot;.&amp;quot;    
#&amp;gt; 
#&amp;gt; [[4]]
#&amp;gt;  [1] &amp;quot;&amp;quot;        &amp;quot;These&amp;quot;   &amp;quot; &amp;quot;       &amp;quot;days&amp;quot;    &amp;quot; &amp;quot;       &amp;quot;a&amp;quot;       &amp;quot; &amp;quot;      
#&amp;gt;  [8] &amp;quot;chicken&amp;quot; &amp;quot; &amp;quot;       &amp;quot;leg&amp;quot;     &amp;quot; &amp;quot;       &amp;quot;is&amp;quot;      &amp;quot; &amp;quot;       &amp;quot;a&amp;quot;      
#&amp;gt; [15] &amp;quot; &amp;quot;       &amp;quot;rare&amp;quot;    &amp;quot; &amp;quot;       &amp;quot;dish&amp;quot;    &amp;quot;.&amp;quot;      
#&amp;gt; 
#&amp;gt; [[5]]
#&amp;gt;  [1] &amp;quot;&amp;quot;       &amp;quot;Rice&amp;quot;   &amp;quot; &amp;quot;      &amp;quot;is&amp;quot;     &amp;quot; &amp;quot;      &amp;quot;often&amp;quot;  &amp;quot; &amp;quot;      &amp;quot;served&amp;quot;
#&amp;gt;  [9] &amp;quot; &amp;quot;      &amp;quot;in&amp;quot;     &amp;quot; &amp;quot;      &amp;quot;round&amp;quot;  &amp;quot; &amp;quot;      &amp;quot;bowls&amp;quot;  &amp;quot;.&amp;quot;     
#&amp;gt; 
#&amp;gt; [[6]]
#&amp;gt;  [1] &amp;quot;&amp;quot;       &amp;quot;The&amp;quot;    &amp;quot; &amp;quot;      &amp;quot;juice&amp;quot;  &amp;quot; &amp;quot;      &amp;quot;of&amp;quot;     &amp;quot; &amp;quot;      &amp;quot;lemons&amp;quot;
#&amp;gt;  [9] &amp;quot; &amp;quot;      &amp;quot;makes&amp;quot;  &amp;quot; &amp;quot;      &amp;quot;fine&amp;quot;   &amp;quot; &amp;quot;      &amp;quot;punch&amp;quot;  &amp;quot;.&amp;quot;     
#&amp;gt; 
#&amp;gt; [[7]]
#&amp;gt;  [1] &amp;quot;&amp;quot;       &amp;quot;The&amp;quot;    &amp;quot; &amp;quot;      &amp;quot;box&amp;quot;    &amp;quot; &amp;quot;      &amp;quot;was&amp;quot;    &amp;quot; &amp;quot;      &amp;quot;thrown&amp;quot;
#&amp;gt;  [9] &amp;quot; &amp;quot;      &amp;quot;beside&amp;quot; &amp;quot; &amp;quot;      &amp;quot;the&amp;quot;    &amp;quot; &amp;quot;      &amp;quot;parked&amp;quot; &amp;quot; &amp;quot;      &amp;quot;truck&amp;quot; 
#&amp;gt; [17] &amp;quot;.&amp;quot;     
#&amp;gt; 
#&amp;gt; [[8]]
#&amp;gt;  [1] &amp;quot;&amp;quot;        &amp;quot;The&amp;quot;     &amp;quot; &amp;quot;       &amp;quot;hogs&amp;quot;    &amp;quot; &amp;quot;       &amp;quot;were&amp;quot;    &amp;quot; &amp;quot;      
#&amp;gt;  [8] &amp;quot;fed&amp;quot;     &amp;quot; &amp;quot;       &amp;quot;chopped&amp;quot; &amp;quot; &amp;quot;       &amp;quot;corn&amp;quot;    &amp;quot; &amp;quot;       &amp;quot;and&amp;quot;    
#&amp;gt; [15] &amp;quot; &amp;quot;       &amp;quot;garbage&amp;quot; &amp;quot;.&amp;quot;      
#&amp;gt; 
#&amp;gt; [[9]]
#&amp;gt;  [1] &amp;quot;&amp;quot;       &amp;quot;Four&amp;quot;   &amp;quot; &amp;quot;      &amp;quot;hours&amp;quot;  &amp;quot; &amp;quot;      &amp;quot;of&amp;quot;     &amp;quot; &amp;quot;      &amp;quot;steady&amp;quot;
#&amp;gt;  [9] &amp;quot; &amp;quot;      &amp;quot;work&amp;quot;   &amp;quot; &amp;quot;      &amp;quot;faced&amp;quot;  &amp;quot; &amp;quot;      &amp;quot;us&amp;quot;     &amp;quot;.&amp;quot;     
#&amp;gt; 
#&amp;gt; [[10]]
#&amp;gt;  [1] &amp;quot;&amp;quot;          &amp;quot;Large&amp;quot;     &amp;quot; &amp;quot;         &amp;quot;size&amp;quot;      &amp;quot; &amp;quot;         &amp;quot;in&amp;quot;       
#&amp;gt;  [7] &amp;quot; &amp;quot;         &amp;quot;stockings&amp;quot; &amp;quot; &amp;quot;         &amp;quot;is&amp;quot;        &amp;quot; &amp;quot;         &amp;quot;hard&amp;quot;     
#&amp;gt; [13] &amp;quot; &amp;quot;         &amp;quot;to&amp;quot;        &amp;quot; &amp;quot;         &amp;quot;sell&amp;quot;      &amp;quot;.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;str_split(regex_sentences, &#39;\\s&#39;) # 띄어쓰기를 기준으로 분절 
#&amp;gt; [[1]]
#&amp;gt; [1] &amp;quot;The&amp;quot;     &amp;quot;birch&amp;quot;   &amp;quot;canoe&amp;quot;   &amp;quot;slid&amp;quot;    &amp;quot;on&amp;quot;      &amp;quot;the&amp;quot;     &amp;quot;smooth&amp;quot; 
#&amp;gt; [8] &amp;quot;planks.&amp;quot;
#&amp;gt; 
#&amp;gt; [[2]]
#&amp;gt; [1] &amp;quot;Glue&amp;quot;        &amp;quot;the&amp;quot;         &amp;quot;sheet&amp;quot;       &amp;quot;to&amp;quot;          &amp;quot;the&amp;quot;        
#&amp;gt; [6] &amp;quot;dark&amp;quot;        &amp;quot;blue&amp;quot;        &amp;quot;background.&amp;quot;
#&amp;gt; 
#&amp;gt; [[3]]
#&amp;gt; [1] &amp;quot;It&#39;s&amp;quot;  &amp;quot;easy&amp;quot;  &amp;quot;to&amp;quot;    &amp;quot;tell&amp;quot;  &amp;quot;the&amp;quot;   &amp;quot;depth&amp;quot; &amp;quot;of&amp;quot;    &amp;quot;a&amp;quot;     &amp;quot;well.&amp;quot;
#&amp;gt; 
#&amp;gt; [[4]]
#&amp;gt; [1] &amp;quot;These&amp;quot;   &amp;quot;days&amp;quot;    &amp;quot;a&amp;quot;       &amp;quot;chicken&amp;quot; &amp;quot;leg&amp;quot;     &amp;quot;is&amp;quot;      &amp;quot;a&amp;quot;      
#&amp;gt; [8] &amp;quot;rare&amp;quot;    &amp;quot;dish.&amp;quot;  
#&amp;gt; 
#&amp;gt; [[5]]
#&amp;gt; [1] &amp;quot;Rice&amp;quot;   &amp;quot;is&amp;quot;     &amp;quot;often&amp;quot;  &amp;quot;served&amp;quot; &amp;quot;in&amp;quot;     &amp;quot;round&amp;quot;  &amp;quot;bowls.&amp;quot;
#&amp;gt; 
#&amp;gt; [[6]]
#&amp;gt; [1] &amp;quot;The&amp;quot;    &amp;quot;juice&amp;quot;  &amp;quot;of&amp;quot;     &amp;quot;lemons&amp;quot; &amp;quot;makes&amp;quot;  &amp;quot;fine&amp;quot;   &amp;quot;punch.&amp;quot;
#&amp;gt; 
#&amp;gt; [[7]]
#&amp;gt; [1] &amp;quot;The&amp;quot;    &amp;quot;box&amp;quot;    &amp;quot;was&amp;quot;    &amp;quot;thrown&amp;quot; &amp;quot;beside&amp;quot; &amp;quot;the&amp;quot;    &amp;quot;parked&amp;quot; &amp;quot;truck.&amp;quot;
#&amp;gt; 
#&amp;gt; [[8]]
#&amp;gt; [1] &amp;quot;The&amp;quot;      &amp;quot;hogs&amp;quot;     &amp;quot;were&amp;quot;     &amp;quot;fed&amp;quot;      &amp;quot;chopped&amp;quot;  &amp;quot;corn&amp;quot;     &amp;quot;and&amp;quot;     
#&amp;gt; [8] &amp;quot;garbage.&amp;quot;
#&amp;gt; 
#&amp;gt; [[9]]
#&amp;gt; [1] &amp;quot;Four&amp;quot;   &amp;quot;hours&amp;quot;  &amp;quot;of&amp;quot;     &amp;quot;steady&amp;quot; &amp;quot;work&amp;quot;   &amp;quot;faced&amp;quot;  &amp;quot;us.&amp;quot;   
#&amp;gt; 
#&amp;gt; [[10]]
#&amp;gt; [1] &amp;quot;Large&amp;quot;     &amp;quot;size&amp;quot;      &amp;quot;in&amp;quot;        &amp;quot;stockings&amp;quot; &amp;quot;is&amp;quot;        &amp;quot;hard&amp;quot;     
#&amp;gt; [7] &amp;quot;to&amp;quot;        &amp;quot;sell.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;



&lt;h1 id=&#34;참고자료&#34;&gt;참고자료&lt;a href=&#34;#%ec%b0%b8%ea%b3%a0%ec%9e%90%eb%a3%8c&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/rstudio/cheatsheets/blob/master/regex.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Rstudio Regular Expression Cheatsheet&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/rstudio/cheatsheets/blob/master/strings.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Rstudio Stringr Cheatsheets&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://sulgik.github.io/r4ds/strings.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;R을 활용한 데이터과학 - 문자열&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>[R] 정규표현식 활용한 텍스트 데이터 다루기</title>
      <link>https://www.jdwblog.com/post/regex/</link>
      <pubDate>Fri, 02 Oct 2020 00:00:00 +0000</pubDate>
      <guid>https://www.jdwblog.com/post/regex/</guid>
      <description>&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/kePrint/kePrint.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/lightable/lightable.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/kePrint/kePrint.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/lightable/lightable.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;https://www.jdwblog.com/post/regex/index_files/str_view/str_view.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;https://www.jdwblog.com/post/regex/index_files/str_view-binding/str_view.js&#34;&gt;&lt;/script&gt;
&lt;p&gt;&lt;img src=&#34;images/regular-expression.gif&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt; 문자형 데이터를 다루는데는 수 많은 기법들이 있습니다. R에서 제공하는 기본 함수들을 통해 처리하기도 하고, 텍스트처리에 특화된 패키지함수를 사용하여 원하는 처리를 할 수 있는데요. 오늘은 그 중에 텍스트데이터를 다루는데 효과적으로 사용되는 &lt;strong&gt;정규표현식&lt;/strong&gt;을 사용하는 법에 대해 알아보도록 하겠습니다.&lt;/p&gt;



&lt;h1 id=&#34;정규표현식&#34;&gt;정규표현식&lt;a href=&#34;#%ec%a0%95%ea%b7%9c%ed%91%9c%ed%98%84%ec%8b%9d&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt; &lt;strong&gt;정규표현식&lt;/strong&gt;(regular expression)은 특정한 규칙을 가진 문자열의 집합을 표현하는데 사용하는 형식 언어입니다.
프로그래밍에서 조건문과 반복문을 통해 원하는 결과값을 도출해내는 것처럼, 텍스트데이터에서 조건과 패턴에 맞는 문자열을 찾거나 추출할때 정규식을 사용합니다. 정규표현식에는 특별한 의미를 지니고 있는 &lt;em&gt;메타문자&lt;/em&gt; 와 문자 그대로의 의미를 지닌 &lt;em&gt;일반문자&lt;/em&gt; 로 구성되어 있습니다.&lt;/p&gt;



&lt;h2 id=&#34;메타문자&#34;&gt;메타문자&lt;a href=&#34;#%eb%a9%94%ed%83%80%eb%ac%b8%ec%9e%90&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt; 메타문자는 정규표현식에서 특별한 의미를 갖는 문자 기호입니다. 키보드에서 알파벳과 숫자를 제외한 특수 기호중에서 미리 정의한 기능을 가진 기호들을 메타문자라고 합니다. ! + \ &amp;amp; ^ [] ~ 등의 문자들이 메타 문자이며 이들은 각각 부여받은 기능들이 있어 이를 조합하여 특정한 패턴을 정의하는 방식으로 사용됩니다.&lt;/p&gt;
&lt;p&gt; 이해를 돕기위해 예시와 함께 살펴보도록 하겠습니다.&lt;/p&gt;



&lt;h3 id=&#34;정규표현식-사용자-함수-생성&#34;&gt;정규표현식 사용자 함수 생성&lt;a href=&#34;#%ec%a0%95%ea%b7%9c%ed%91%9c%ed%98%84%ec%8b%9d-%ec%82%ac%ec%9a%a9%ec%9e%90-%ed%95%a8%ec%88%98-%ec%83%9d%ec%84%b1&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;  R Studio의 &lt;strong&gt;&lt;code&gt;stringr&lt;/code&gt;&lt;/strong&gt; 패키지 Cheat Sheet에 좋은 예시함수가 있어서 이를 차용하였습니다. 정규표현식 조건에 맞는 문자는 음영처리되어 보여집니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see &amp;lt;- function(rx) str_view_all(&amp;quot;abc ABC 123\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&amp;quot;, rx)
&lt;/code&gt;&lt;/pre&gt;



&lt;h3 id=&#34;heading&#34;&gt;“^”&lt;a href=&#34;#heading&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; &lt;strong&gt;^&lt;/strong&gt;(윗꺽쇠)는 문자열의 시작지점을 의미합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;^&#39;) # 문자열의 시작지점을 매칭 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-1&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-1&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;abc ABC 123\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;



&lt;h3 id=&#34;heading-1&#34;&gt;“$”&lt;a href=&#34;#heading-1&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; &lt;strong&gt;$&lt;/strong&gt;(달러표시)는 문자열의 끝 또는 문서의 끝을 의미합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;$&#39;) # 문자열의 끝지점을 매칭 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-2&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-2&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;



&lt;h3 id=&#34;heading-2&#34;&gt;“.”&lt;a href=&#34;#heading-2&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; &lt;strong&gt;.&lt;/strong&gt;(마침표)는 임의의 한 글자를 의미합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;.&#39;) # 임의의 글자를 매칭 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-3&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-3&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;A&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;B&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;C&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;1&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;2&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;3&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\t&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;!&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;?&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\\&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;(&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;)&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;{&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;}&lt;\/span&gt;\n&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt; 다른 규칙없이 마침표만을 단독으로 사용하니 임의의 모든 글자가 선택되었습니다.&lt;/p&gt;



&lt;h3 id=&#34;heading-3&#34;&gt;“?”&lt;a href=&#34;#heading-3&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;  &lt;strong&gt;?&lt;/strong&gt;(물음표)는 앞에 지정된 문자가 없거나 하나가 있음을 의미합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;?&#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;#&amp;gt; Error in stri_locate_all_regex(string, pattern, omit_no_match = TRUE, : Syntax error in regexp pattern. (U_REGEX_RULE_SYNTAX, context=`?`)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; 물음표를 단독으로 사용하니 에러가 발생하였습니다. 이는 물음표 조건에 맞지 않기 때문입니다. ‘ab?c’(a와 c 사이에 b가 하나 있거나 아니면 아예 없거나) 조건으로 설정해보겠습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;ab?c&#39;) # &#39;a&#39;와 &#39;c&#39; 사이에 &#39;b&#39;가 하나 있거나 혹은 아예 없는 경우 (&#39;abc&#39; or &#39;ac&#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-4&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-4&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt; ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt;de aaa b&lt;span class=&#39;match&#39;&gt;ac&lt;\/span&gt;ad .a.aa.aaa abbaab ab&lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt;dcb&lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt;de&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt; 정규표현식은 대소문자를 구분하기 때문에 소문자 ’abc’와 ’ac’가 선택된 것을 볼 수 있습니다. 정규표현식의 규칙은 매우 엄격하게 지켜지기 때문에 정규표현을 사용할 때는 정확한 규칙을 만들어서 사용할 필요가 있습니다.&lt;/p&gt;



&lt;h3 id=&#34;heading-4&#34;&gt;“|”&lt;a href=&#34;#heading-4&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; &lt;strong&gt;|&lt;/strong&gt;(또는)은 의미 그대로 또는을 의미합니다. &lt;strong&gt;|&lt;/strong&gt; 기호를 기준으로 좌우에 해당하는 문자들을 찾습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a|c&#39;) # &#39;a&#39; 또는 &#39;c&#39;를 찾아냄
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-5&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-5&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt; ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;de &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;d .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;d&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;de&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;



&lt;h3 id=&#34;heading-5&#34;&gt;“+”&lt;a href=&#34;#heading-5&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; &lt;strong&gt;+&lt;/strong&gt;(더하기)는 앞 문자가 &lt;strong&gt;1개이상&lt;/strong&gt;인 경우를 의미합니다. &lt;strong&gt;+&lt;/strong&gt; 기호의 좌측 문자를 기준으로 찾습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a+&#39;)  # &#39;a&#39; 글자가 한 개 이상 존재하는 경우  
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-6&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-6&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bc ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde &lt;span class=&#39;match&#39;&gt;aaa&lt;\/span&gt; b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;d .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;aa&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;aaa&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bb&lt;span class=&#39;match&#39;&gt;aa&lt;\/span&gt;b &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcdcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;ac+&#39;) # &#39;a&#39; 다음에 &#39;c&#39;가 하나 이상 있음 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-7&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-7&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}\n abcde aaa b&lt;span class=&#39;match&#39;&gt;ac&lt;\/span&gt;ad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;



&lt;h3 id=&#34;heading-6&#34;&gt;&amp;ldquo;*&amp;rdquo;&lt;a href=&#34;#heading-6&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;  &lt;strong&gt;*&lt;/strong&gt;(곱하기)는 앞 문자가 &lt;strong&gt;0개이상&lt;/strong&gt; 인 경우를 의미합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a*&#39;) # &#39;a&#39; 글자를 반환 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-8&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-8&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;A&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;B&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;C&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;1&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;2&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;3&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;\t&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;!&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;?&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;\\&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;(&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;)&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;{&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;}&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;\n&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;d&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;e&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;aaa&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;d&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;aa&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;aaa&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;aa&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;d&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;d&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;e&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;ac*&#39;)# &#39;a&#39; 다음에 &#39;c&#39;가 없거나 하나 이상 있음 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-9&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-9&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bc ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; b&lt;span class=&#39;match&#39;&gt;ac&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;d .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcdcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt;  *** **(곱하기)는 &lt;strong&gt;+&lt;/strong&gt;(더하기)와 유사하지만 결정적인 차이점으로 &lt;strong&gt;+&lt;/strong&gt;(더하기)는 기호에 해당하는 문자가 하나라도 있는 문자를 반환하지만, &lt;strong&gt;*&lt;/strong&gt;(곱하기)는 앞에 해당문자가 존재하지 않더라도 반환하는 특징이 있습니다.&lt;/p&gt;



&lt;h3 id=&#34;-&#34;&gt;“[ ]”&lt;a href=&#34;#-&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;  &lt;strong&gt;[ ]&lt;/strong&gt;(대괄호)는 문자를 묶어서 표현할때 사용됩니다. 대괄호에 묶인 문자들은 각각 or로 취급이 됩니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;[abc]&#39;)        # &#39;a&#39; or &#39;b&#39; or &#39;c&#39;를 찾아 반환
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-10&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-10&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt; ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;de &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;d .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;d&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;de&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;[abcde]c&#39;)     # &#39;c&#39; 앞에 &#39;a&#39; or &#39;b&#39; or &#39;c&#39; or &#39;d&#39; or &#39;e&#39; 문자를 찾아 반환 (&#39;ac&#39;, &#39;bc&#39; 반환) 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-11&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-11&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;a&lt;span class=&#39;match&#39;&gt;bc&lt;\/span&gt; ABC 123\t.!?\\(){}\n a&lt;span class=&#39;match&#39;&gt;bc&lt;\/span&gt;de aaa b&lt;span class=&#39;match&#39;&gt;ac&lt;\/span&gt;ad .a.aa.aaa abbaab aba&lt;span class=&#39;match&#39;&gt;bc&lt;\/span&gt;ba&lt;span class=&#39;match&#39;&gt;bc&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;dc&lt;\/span&gt;ba&lt;span class=&#39;match&#39;&gt;bc&lt;\/span&gt;de&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;[A-Z][A-Z]C&#39;)  # &#39;C&#39;의 두 부분 앞 문자에서 A부터 Z글자까지 있는 문자를 찾아서 반환 (&#39;ABC&#39; 반환)
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-12&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-12&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc &lt;span class=&#39;match&#39;&gt;ABC&lt;\/span&gt; 123\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt; 또한, 특정한 문자를 제외하는 의미로서 대괄호 안에 &lt;strong&gt;^&lt;/strong&gt;(윗 꺽쇠)를 사용합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;[^abc]&#39;) # &#39;a&#39; or &#39;b&#39; or &#39;c&#39;를 제외한 문자를 반환
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-13&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-13&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;A&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;B&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;C&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;1&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;2&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;3&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\t&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;!&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;?&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\\&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;(&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;)&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;{&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;}&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\n&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abc&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;baca&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;a&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;aa&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abbaab&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;ababcbabc&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;cbabc&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;



&lt;h3 id=&#34;--1&#34;&gt;“{ }”&lt;a href=&#34;#--1&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; &lt;strong&gt;{ }&lt;/strong&gt;(중괄호)는 문자의 개수를 샐때 사용됩니다. 중괄호에는 세가지 용법이 있습니다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;{n,m} : 앞 문자가 n개 이상 m개 이하를 의미.&lt;/li&gt;
&lt;li&gt;{n,} : 앞 문자가 n개 이상을 의미.&lt;/li&gt;
&lt;li&gt;{n} : 앞 문자가 정확하게 n개를 의미.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a{1,2}&#39;) # &#39;a&#39; 글자가 1개 이상 2개 이하를 표시 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-14&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-14&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bc ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde &lt;span class=&#39;match&#39;&gt;aa&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;d .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;aa&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;aa&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bb&lt;span class=&#39;match&#39;&gt;aa&lt;\/span&gt;b &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcdcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;b{1,}&#39;)  # &#39;b&#39; 글자가 1개 이상인 경우를 표시
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-15&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-15&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;a&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;c ABC 123\t.!?\\(){}\n a&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;cde aaa &lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;acad .a.aa.aaa a&lt;span class=&#39;match&#39;&gt;bb&lt;\/span&gt;aa&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt; a&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;a&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;c&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;a&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;cdc&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;a&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;cde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;c{1}&#39;)   # &#39;c&#39; 글자가 1개인 경우를 표시 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-16&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-16&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;ab&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt; ABC 123\t.!?\\(){}\n ab&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;de aaa ba&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;ad .a.aa.aaa abbaab abab&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;bab&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;d&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;bab&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;de&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;



&lt;h3 id=&#34;--2&#34;&gt;“( )”&lt;a href=&#34;#--2&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; &lt;strong&gt;( )&lt;/strong&gt;(소괄호)는 문자를 묶어서 표현할때 사용합니다. 소괄호에 묶인 문자들은 각각 and로 취급됩니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;(abc)&#39;)    # &#39;abc&#39; 문자를 찾아 반화 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-17&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-17&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt; ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt;de aaa bacad .a.aa.aaa abbaab ab&lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt;dcb&lt;span class=&#39;match&#39;&gt;abc&lt;\/span&gt;de&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;(abcde)c&#39;) # &#39;c&#39; 앞에 &#39;abcde&#39; 문자를 찾아 반환 (조건에 맞는 결과 없음)
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-18&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-18&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a(bc)ba&#39;)  # &#39;a&#39; 와 &#39;ba&#39; 사이에 &#39;bc&#39;가 존재하는 경우의 문자를 반환 (&#39;abcba&#39; 반환)
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-19&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-19&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ab&lt;span class=&#39;match&#39;&gt;abcba&lt;\/span&gt;bcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a(b|c)ba&#39;) # &#39;a&#39; 와 &#39;ba&#39; 사이에 &#39;b&#39; 또는 &#39;c&#39;가 존재하는 경우의 문자를 반환 (&#39;abba&#39; 반환 ) 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-20&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-20&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa &lt;span class=&#39;match&#39;&gt;abba&lt;\/span&gt;ab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt; 대괄호에 묶인 문자는 ‘or’ 취급이지만, 소괄호는 위의 경우처럼 별도의 or 표시 없이는 ‘and’ 취급이 되는것이 차이점입니다.&lt;/p&gt;



&lt;h3 id=&#34;heading-7&#34;&gt;“\”&lt;a href=&#34;#heading-7&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; 앞서 &lt;strong&gt;.&lt;/strong&gt;(마침표)는 임의의 한 글자를 찾을때 사용하는 메타문자라고 말씀을 드렸는데요. 그렇다면 만약 정규표현식을 사용하여 마침표 자체를 찾고싶을땐 어떻게 해야할까요? ’a.a’라는 문자를 찾는 상황을 가정해보겠습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a.a&#39;) # &#39;a.a&#39; 문자 반환?
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-21&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-21&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}\n abcde &lt;span class=&#39;match&#39;&gt;aaa&lt;\/span&gt; b&lt;span class=&#39;match&#39;&gt;aca&lt;\/span&gt;d .&lt;span class=&#39;match&#39;&gt;a.a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a.a&lt;\/span&gt;a&lt;span class=&#39;match&#39;&gt;a a&lt;\/span&gt;bbaab &lt;span class=&#39;match&#39;&gt;aba&lt;\/span&gt;bcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt; ‘a.a’라는 문자를 찾은걸 볼 수 있지만, 그것과 더불어서 ’aaa,’ ‘aca,’ ’a a’문자 역시 매칭이 되는 것을 볼 수 있습니다. 그 이유는 공교롭게도 “.”(마침표)역시 정규표현식에서 특수한 의미를 갖는 메타문자이기 때문입니다. 정규표현식 내에서 메타문자 자체를 특정하기 위해선 그 문자 앞에 메타문자 종류중 하나인 “&lt;strong&gt;\&lt;/strong&gt;”(역슬래시)를 붙여야합니다.&lt;/p&gt;
&lt;p&gt; 그렇다면 이번에는 역슬래시를 활용하여 ’a.a’라는 문자를 찾아보도록 하겠습니다. 문자 가운데에 마침표가 메타문자가 아니라는것을 인지시키기 위하여 마침표 앞에 역슬래시를 붙였습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a\.a&#39;) # 역슬래시 사용 
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;#&amp;gt; Error: &amp;quot;&#39;a\.&amp;quot;로 시작하는 문자열 중에서 &#39;\.&#39;는 인식할 수 없는 이스케이프입니다
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; 역슬래시를 사용했음에도 불구하고 에러가 발생하였습니다. 여기서 한가지 더 짚고 넘어가야 할 부분은 메타문자를 찾기 위해선 역슬래시를 두 개를 붙여야 한다는 것입니다. 왜 그러하냐 하면 입력된 문자를 R parser가 처리하는 과정에서 역슬래시를 추정하는데 두 개의 역슬래시를 요구하기 때문입니다. 역슬래시를 하나만을 붙여서는 R에서 인지하지 못합니다. 역슬래시의 기능을 사용하기 위해선 &lt;strong&gt;역슬래시 두 개를 붙여줘야 합니다.&lt;/strong&gt; 그래야 비로소 R이 두 개 붙인 역슬래시 앞의 역슬래시가 일반문자가 아님을 인지하고 해당 패턴을 찾아냅니다.&lt;/p&gt;
&lt;p&gt; 이처럼 역슬래시가 메타문자를 메타문자로부터 탈출시키기에 &lt;em&gt;이스케이프 문자&lt;/em&gt;라 부르기도 합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a\\.a&#39;) # 역슬래시 두 개 사용 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-22&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-22&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}\n abcde aaa bacad .&lt;span class=&#39;match&#39;&gt;a.a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a.a&lt;\/span&gt;aa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;p&gt; 이번에는 찾고자 하던 ’a.a’단어를 정확하게 찾아낸 것을 볼 수 있습니다.&lt;/p&gt;



&lt;h3 id=&#34;--일반문자&#34;&gt;“\ + 일반문자”&lt;a href=&#34;#--%ec%9d%bc%eb%b0%98%eb%ac%b8%ec%9e%90&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; 앞서 역슬래시( \ )가 일반문자로 탈출시키는 &lt;em&gt;이스케이프 문자&lt;/em&gt;라 설명드렸는데요. 정규표현식에서는 이러한 이스케이프 문자의 특성을 살린 특별한 기능이 몇 가지 더 있습니다. 그건 바로 일반 이스케이프 문자와 일반문자와의 조합을 통해 새로운 기능을 수행하는 것입니다. 일반문자중 일부 문자들은 이러한 특성을 지니고 있으며, 이를 정리하자면 다음과 같습니다.&lt;/p&gt;
&lt;table class=&#34;table table-striped table-hover table-condensed&#34; style=&#34;font-size: 13px; &#34;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&#34;text-align:center;&#34;&gt;
＼ + 일반문자
&lt;/th&gt;
&lt;th style=&#34;text-align:center;&#34;&gt;
의미
&lt;/th&gt;
&lt;th style=&#34;text-align:center;&#34;&gt;
예시
&lt;/th&gt;
&lt;th style=&#34;text-align:center;&#34;&gt;
결과
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 12em; &#34;&gt;
＼n
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 7em; &#34;&gt;
줄바꿈
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
see(“\\n”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 60em; &#34;&gt;
&lt;div id=&#34;htmlwidget-23&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-23&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}&lt;span class=&#39;match&#39;&gt;\n&lt;\/span&gt; abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 12em; &#34;&gt;
＼t
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 7em; &#34;&gt;
탭
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
see(“\\t”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 60em; &#34;&gt;
&lt;div id=&#34;htmlwidget-24&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-24&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123&lt;span class=&#39;match&#39;&gt;\t&lt;\/span&gt;.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 12em; &#34;&gt;
＼s
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 7em; &#34;&gt;
공백
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
see(“\\s”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 60em; &#34;&gt;
&lt;div id=&#34;htmlwidget-25&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-25&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;ABC&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;123&lt;span class=&#39;match&#39;&gt;\t&lt;\/span&gt;.!?\\(){}&lt;span class=&#39;match&#39;&gt;\n&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abcde&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;bacad&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;.a.aa.aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abbaab&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 12em; &#34;&gt;
＼S
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 7em; &#34;&gt;
공백아님
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
see(“\\S”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 60em; &#34;&gt;
&lt;div id=&#34;htmlwidget-26&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-26&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;A&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;B&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;C&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;1&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;2&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;3&lt;\/span&gt;\t&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;!&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;?&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\\&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;(&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;)&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;{&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;}&lt;\/span&gt;\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 12em; &#34;&gt;
＼d
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 7em; &#34;&gt;
숫자
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
see(“\\d”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 60em; &#34;&gt;
&lt;div id=&#34;htmlwidget-27&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-27&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC &lt;span class=&#39;match&#39;&gt;1&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;2&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;3&lt;\/span&gt;\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 12em; &#34;&gt;
＼D
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 7em; &#34;&gt;
숫자아님
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
see(“\\D”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 60em; &#34;&gt;
&lt;div id=&#34;htmlwidget-28&#34; class=&#34;str_view html-widget&#34; style=&#34;width:620px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-28&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;A&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;B&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;C&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;123&lt;span class=&#39;match&#39;&gt;\t&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;!&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;?&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\\&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;(&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;)&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;{&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;}&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\n&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 12em; &#34;&gt;
＼w
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 7em; &#34;&gt;
문자
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
see(“\\w”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 60em; &#34;&gt;
&lt;div id=&#34;htmlwidget-29&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-29&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;A&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;B&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;C&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;1&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;2&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;3&lt;\/span&gt;\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt; .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 12em; &#34;&gt;
＼W
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 7em; &#34;&gt;
문자아님
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
see(“\\W”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 60em; &#34;&gt;
&lt;div id=&#34;htmlwidget-30&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-30&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;ABC&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;123&lt;span class=&#39;match&#39;&gt;\t&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;!&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;?&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\\&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;(&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;)&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;{&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;}&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\n&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abcde&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;bacad&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;a&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;aa&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abbaab&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 12em; &#34;&gt;
＼b
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 7em; &#34;&gt;
단어경계
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
see(“\\b”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 60em; &#34;&gt;
&lt;div id=&#34;htmlwidget-31&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-31&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;abc&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;ABC&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;123&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;abcde&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;aaa&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;bacad&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; .&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;a&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;aa&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;aaa&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;abbaab&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;ababcbabcdcbabcde&lt;span class=&#39;match&#39;&gt;&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;



&lt;h3 id=&#34;특수표현&#34;&gt;특수표현&lt;a href=&#34;#%ed%8a%b9%ec%88%98%ed%91%9c%ed%98%84&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt; 이 밖에도 정규표현식에서는 &lt;strong&gt;“[: :]”&lt;/strong&gt; 형태로 존재하는 특수한 표현식이 존재합니다.&lt;/p&gt;
&lt;table class=&#34;table table-striped table-hover table-condensed&#34; style=&#34;font-size: 13px; &#34;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&#34;text-align:center;&#34;&gt;
［: :］
&lt;/th&gt;
&lt;th style=&#34;text-align:center;&#34;&gt;
의미
&lt;/th&gt;
&lt;th style=&#34;text-align:center;&#34;&gt;
예시
&lt;/th&gt;
&lt;th style=&#34;text-align:center;&#34;&gt;
결과
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 5em; &#34;&gt;
［:digit:］
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
숫자
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 15em; &#34;&gt;
see(“［:digit:］”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 58em; &#34;&gt;
&lt;div id=&#34;htmlwidget-32&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-32&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC &lt;span class=&#39;match&#39;&gt;1&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;2&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;3&lt;\/span&gt;\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 5em; &#34;&gt;
［:alpha:］
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
문자
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 15em; &#34;&gt;
see(“［:alpha:］”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 58em; &#34;&gt;
&lt;div id=&#34;htmlwidget-33&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-33&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;A&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;B&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;C&lt;\/span&gt; 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt; .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 5em; &#34;&gt;
［:lower:］
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
소문자
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 15em; &#34;&gt;
see(“［:lower:］”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 58em; &#34;&gt;
&lt;div id=&#34;htmlwidget-34&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-34&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt; ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt; .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 5em; &#34;&gt;
［:upper:］
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
대문자
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 15em; &#34;&gt;
see(“［:upper:］”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 58em; &#34;&gt;
&lt;div id=&#34;htmlwidget-35&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-35&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc &lt;span class=&#39;match&#39;&gt;A&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;B&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;C&lt;\/span&gt; 123\t.!?\\(){}\n abcde aaa bacad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 5em; &#34;&gt;
［:alnum:］
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
문자+숫자
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 15em; &#34;&gt;
see(“［:alnum:］”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 58em; &#34;&gt;
&lt;div id=&#34;htmlwidget-36&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-36&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;A&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;B&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;C&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;1&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;2&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;3&lt;\/span&gt;\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt; .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 5em; &#34;&gt;
［:punct:］
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
기호
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 15em; &#34;&gt;
see(“［:punct:］”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 58em; &#34;&gt;
&lt;div id=&#34;htmlwidget-37&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-37&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;!&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;?&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\\&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;(&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;)&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;{&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;}&lt;\/span&gt;\n abcde aaa bacad &lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;a&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;aa&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 5em; &#34;&gt;
［:graph:］
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
문자+숫자+기호
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 15em; &#34;&gt;
see(“［:graph:］”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 58em; &#34;&gt;
&lt;div id=&#34;htmlwidget-38&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-38&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;A&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;B&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;C&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;1&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;2&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;3&lt;\/span&gt;\t&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;!&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;?&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;\\&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;(&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;)&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;{&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;}&lt;\/span&gt;\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;.&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;b&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;c&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;d&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;e&lt;\/span&gt;&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 5em; &#34;&gt;
［:space:］
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
띄어쓰기
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 15em; &#34;&gt;
see(“［:space:］”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 58em; &#34;&gt;
&lt;div id=&#34;htmlwidget-39&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-39&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;ABC&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;123&lt;span class=&#39;match&#39;&gt;\t&lt;\/span&gt;.!?\\(){}&lt;span class=&#39;match&#39;&gt;\n&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abcde&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;bacad&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;.a.aa.aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abbaab&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:center;min-width: 5em; &#34;&gt;
［:blank:］
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 10em; &#34;&gt;
띄어쓰기+탭
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 15em; &#34;&gt;
see(“［:blank:］”)
&lt;/td&gt;
&lt;td style=&#34;text-align:center;min-width: 58em; &#34;&gt;
&lt;div id=&#34;htmlwidget-40&#34; class=&#34;str_view html-widget&#34; style=&#34;width:600px;height:10px;&#34;&gt;
&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-40&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;ABC&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;123&lt;span class=&#39;match&#39;&gt;\t&lt;\/span&gt;.!?\\(){}\n&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abcde&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;bacad&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;.a.aa.aaa&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;abbaab&lt;span class=&#39;match&#39;&gt; &lt;\/span&gt;ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class=&#34;alert alert-note&#34;&gt;
  &lt;div&gt;
    참고로 위의 표에서 사용된 일부 역슬래시와 대괄호는 출력상의 이유로 인해 일반적으로 사용하는 문자가 아닌 특수문자로 대체하였습니다. 예시함수를 사용 할 때 혹시나 에러가 발생한다면 역슬래시와 대괄호를 원래 키로 수정하여 사용하시기 바랍니다.
  &lt;/div&gt;
&lt;/div&gt;



&lt;h3 id=&#34;위치-탐색자&#34;&gt;위치 탐색자&lt;a href=&#34;#%ec%9c%84%ec%b9%98-%ed%83%90%ec%83%89%ec%9e%90&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;  다음은 문자를 기준으로 바로 앞뒤 문자를 찾거나 그 반대인 상황을 찾을때 사용하는 표현식입니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a(?=c)&#39;)  # &#39;a&#39;가 &#39;c&#39; 바로 뒤에 있는 경우를 반환         
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-41&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-41&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}\n abcde aaa b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;cad .a.aa.aaa abbaab ababcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;a(?!c)&#39;)  # &#39;a&#39;가 &#39;c&#39; 바로 뒤따르지 않는 경우를 반환 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-42&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-42&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bc ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; bac&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;d .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcdcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;(?&amp;lt;=b)a&#39;) # &#39;a&#39;가 &#39;b&#39; 바로 앞에 있는 경우를 반환 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-43&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-43&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;abc ABC 123\t.!?\\(){}\n abcde aaa b&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;cad .a.aa.aaa abb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;ab ab&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcdcb&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;see(&#39;(?&amp;lt;!b)a&#39;) # &#39;a&#39;가 &#39;b&#39; 바로 앞에 있지 않는 경우를 반환 
&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-44&#34; style=&#34;width:960px;height:100%;&#34; class=&#34;str_view html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-44&#34;&gt;{&#34;x&#34;:{&#34;html&#34;:&#34;&lt;ul&gt;\n  &lt;li&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bc ABC 123\t.!?\\(){}\n &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bcde &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; bac&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;d .&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;.&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt; &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;bba&lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;b &lt;span class=&#39;match&#39;&gt;a&lt;\/span&gt;babcbabcdcbabcde&lt;\/li&gt;\n&lt;\/ul&gt;&#34;},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;hr&gt;
&lt;p&gt; 정리를 하다보니 분량이 꽤나 길어진 것 같습니다. 정규표현식은 비단 R에서 뿐만 아니라 다른 프로그래밍 언어에서도 적극 사용되는 용법이어서 한번 익혀두면 두고두고 써먹을 수 있는 장점이 있는데요. 여기에 소개하지 못한 다른 정규표현식도 많이 존재합니다. 더 자세히 공부를 하고자 하시는 분들을 위한 링크를 밑에 삽입하였으니 참고하시면 도움이 될 수 있겠습니다. R에서 텍스트데이터를 다루는 패키지 중 하나인 &lt;strong&gt;&lt;code&gt;stringr&lt;/code&gt;&lt;/strong&gt; 패키지와 정규표현식을 결합하여 사용하면 더욱 효과적으로 사용할 수 있는데요. 이는 다음장에서 다뤄보도록 하겠습니다.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://regexone.com/&#34;&gt;https://regexone.com/&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;



&lt;h1 id=&#34;참고자료&#34;&gt;참고자료&lt;a href=&#34;#%ec%b0%b8%ea%b3%a0%ec%9e%90%eb%a3%8c&#34;&gt;&lt;svg class=&#34;anchor-symbol&#34; height=&#34;26&#34; width=&#34;26&#34; viewBox=&#34;0 0 22 22&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path d=&#34;M0 0h24v24H0z&#34; fill=&#34;currentColor&#34;&gt;&lt;/path&gt;
&lt;path d=&#34;M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76.0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71.0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71.0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76.0 5-2.24 5-5s-2.24-5-5-5z&#34;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/a&gt;
&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.microsoft.com/ko-kr/previous-versions/visualstudio/visual-studio-2010/ae5bf541%28v=vs.100%29?redirectedfrom=MSDN&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Microsoft Docs 정규식 구문&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://ko.wikipedia.org/wiki/%EC%A0%95%EA%B7%9C_%ED%91%9C%ED%98%84%EC%8B%9D&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Wikipedia 정규표현식&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://namu.wiki/w/%EC%A0%95%EA%B7%9C%20%ED%91%9C%ED%98%84%EC%8B%9D?from=%EC%A0%95%EA%B7%9C%ED%91%9C%ED%98%84%EC%8B%9D&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;나무위키 정규표현식&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
  </channel>
</rss>
