<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Development Notes(~23.05.14, 이전)</title>
    <link>https://whitekeyboard.tistory.com/</link>
    <description></description>
    <language>ko</language>
    <pubDate>Tue, 19 May 2026 20:05:23 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>kkk20000a</managingEditor>
    <item>
      <title>[EasyOCR] EasyOCR의 External Libraries 구조에는 뭐가 있나 알아보기</title>
      <link>https://whitekeyboard.tistory.com/914</link>
      <description>&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;들어가며...&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; EasyOCR을 이용중인데 약간의 커스텀한 작업이 필요해서 소스를 내려받고 프로젝트를 나름 분석하는 중인데, 외부 라이브러리를 어떤식으로 끌어다 쓰는지 그리고 프로젝트 구성은 어떻게 이뤄졌는지 알아보려고 이 글을 정리한다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;&quot;&gt;EasyOCR만의 구조적 특징은 아니며, 파이썬 프로젝트가 공통적으로 가지고 있는 특징이긴한데, 내부 폴더를 열면 구성하고 있는 라이브러리에 따라 더 많이 있을 수도 있고 더 적을 수도 있으니 폴더별 역할이 이런이런 기능들이 모여있는 폴더구나 정도만 이 글에서 알아가면 될 것 같다. 그리고 이 수준에서 이 글을 정리한 것이라 Easy OCR만의 프로젝트 구성을 분석하려는 사람에게는 크게 도움이 되지 않을 수도 있다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;External Library&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 본 소스를 도와주는 외부 라이브러리 구성은 어떻게 되었는지 간단히 정리하자면, 일단 모든 파이썬 프로젝트들이 공통적으로 구성되는 &quot;External Libraries&quot; 폴더는 외부 라이브러리와 관련된 파일들을 포함하는 폴더라고 보면 됩니다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;468&quot; data-origin-height=&quot;1248&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/p7Jee/btsfgieziJu/qk4lUPmMb0Ke7PTenT7pD0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/p7Jee/btsfgieziJu/qk4lUPmMb0Ke7PTenT7pD0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/p7Jee/btsfgieziJu/qk4lUPmMb0Ke7PTenT7pD0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fp7Jee%2FbtsfgieziJu%2Fqk4lUPmMb0Ke7PTenT7pD0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;189&quot; height=&quot;504&quot; data-origin-width=&quot;468&quot; data-origin-height=&quot;1248&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;Python&amp;nbsp;3.9&amp;nbsp;(EasyOCR): &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이 폴더는 외부 라이브러리 최상위 폴더로 EasyOCR이라는 외부 라이브러리와 관련된 파일들을 포함하고 있는 폴더라고 생각하면 됩니다.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;Binary&amp;nbsp;Skeletons: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이 폴더는 파이썬 바이너리 라이브러리와 관련된 파일들을 포함하는데 모든 파이썬 프로젝트 공통 폴더라고 보면 되고 즉, 프로젝트가 독립적으로 구성될 수 있도록 돕는 폴더. 이러한 라이브러리는 C/C++ 등의 언어로 작성되어 파이썬 인터프리터와 상호 작용합니다. 이 폴더에는 이러한 바이너리 라이브러리의 파일이 저장되어 있고 이 파일들은 파이썬 인터프리터에 의해 필요에 따라 동적으로 로드됩니다. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;DLLs: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이&amp;nbsp;폴더는&amp;nbsp;파이썬&amp;nbsp;DLL(Dynamic-Link&amp;nbsp;Library)&amp;nbsp;파일들을&amp;nbsp;포함합니다.&amp;nbsp;DLL은&amp;nbsp;다른&amp;nbsp;프로그램들과&amp;nbsp;공유되는&amp;nbsp;코드와&amp;nbsp;데이터를&amp;nbsp;포함하는&amp;nbsp;파일입니다.&amp;nbsp;파이썬에서는&amp;nbsp;특정&amp;nbsp;라이브러리나&amp;nbsp;모듈이&amp;nbsp;DLL&amp;nbsp;형태로&amp;nbsp;제공될&amp;nbsp;수&amp;nbsp;있으며,&amp;nbsp;이&amp;nbsp;폴더에&amp;nbsp;해당&amp;nbsp;DLL&amp;nbsp;파일들이&amp;nbsp;저장됩니다.&amp;nbsp;이러한&amp;nbsp;DLL&amp;nbsp;파일은&amp;nbsp;파이썬&amp;nbsp;프로젝트에서&amp;nbsp;사용되는&amp;nbsp;외부&amp;nbsp;라이브러리의&amp;nbsp;일부입니다. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;Extended&amp;nbsp;Definitions: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이&amp;nbsp;폴더는&amp;nbsp;확장된&amp;nbsp;형식&amp;nbsp;정의&amp;nbsp;파일들을&amp;nbsp;포함합니다.&amp;nbsp;확장된&amp;nbsp;형식&amp;nbsp;정의&amp;nbsp;파일은&amp;nbsp;특정&amp;nbsp;라이브러리나&amp;nbsp;모듈에&amp;nbsp;대한&amp;nbsp;형식&amp;nbsp;정보를&amp;nbsp;제공합니다.&amp;nbsp;이&amp;nbsp;정보는&amp;nbsp;코드&amp;nbsp;편집기와&amp;nbsp;같은&amp;nbsp;도구에서&amp;nbsp;자동&amp;nbsp;완성,&amp;nbsp;정적&amp;nbsp;분석&amp;nbsp;등을&amp;nbsp;지원하기&amp;nbsp;위해&amp;nbsp;사용됩니다.&amp;nbsp;확장된&amp;nbsp;형식&amp;nbsp;정의&amp;nbsp;파일들은&amp;nbsp;외부&amp;nbsp;라이브러리의&amp;nbsp;클래스,&amp;nbsp;함수,&amp;nbsp;변수&amp;nbsp;등에&amp;nbsp;대한&amp;nbsp;설명과&amp;nbsp;타입&amp;nbsp;정보를&amp;nbsp;포함합니다. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;Lib: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이 폴더는 파이썬 표준 라이브러리와 관련된 파일들을 포함합니다. 파이썬 표준 라이브러리는 파이썬 언어에 기본적으로 포함된 모듈과 함수들의 집합입니다. Lib 폴더에는 내장 모듈 및 기본 함수와 클래스들에 대한 소스 코드 파일들이 저장됩니다.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;Python39: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이&amp;nbsp;폴더는&amp;nbsp;파이썬&amp;nbsp;3.9&amp;nbsp;버전에&amp;nbsp;대한&amp;nbsp;실행&amp;nbsp;파일과&amp;nbsp;관련된&amp;nbsp;파일들을&amp;nbsp;포함합니다.&amp;nbsp;파이썬은&amp;nbsp;버전별로&amp;nbsp;릴리스되며,&amp;nbsp;각&amp;nbsp;버전마다&amp;nbsp;실행&amp;nbsp;파일&amp;nbsp;및&amp;nbsp;관련&amp;nbsp;파일들이&amp;nbsp;필요합니다.&amp;nbsp;Python39&amp;nbsp;폴더에는&amp;nbsp;파이썬&amp;nbsp;3.9&amp;nbsp;버전&amp;nbsp;실행&amp;nbsp;파일과&amp;nbsp;해당&amp;nbsp;버전에서&amp;nbsp;사용되는&amp;nbsp;기타&amp;nbsp;파일들이&amp;nbsp;저장됩니다. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;site-packages: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이&amp;nbsp;폴더는&amp;nbsp;외부&amp;nbsp;라이브러리들을&amp;nbsp;포함합니다.&amp;nbsp;파이썬&amp;nbsp;패키지&amp;nbsp;관리자인&amp;nbsp;pip를&amp;nbsp;통해&amp;nbsp;설치한&amp;nbsp;외부&amp;nbsp;라이브러리들이&amp;nbsp;이&amp;nbsp;폴더에&amp;nbsp;저장됩니다.&amp;nbsp;외부&amp;nbsp;라이브러리는&amp;nbsp;프로젝트에서&amp;nbsp;필요한&amp;nbsp;추가&amp;nbsp;기능을&amp;nbsp;제공하거나&amp;nbsp;특정&amp;nbsp;작업을&amp;nbsp;수행하기&amp;nbsp;위해&amp;nbsp;사용됩니다.&amp;nbsp;프로젝트에서는&amp;nbsp;이&amp;nbsp;폴더에&amp;nbsp;있는&amp;nbsp;라이브러리를&amp;nbsp;import하여&amp;nbsp;사용할&amp;nbsp;수&amp;nbsp;있습니다. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;venv: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이&amp;nbsp;폴더는&amp;nbsp;가상&amp;nbsp;환경(Virtual&amp;nbsp;Environment)과&amp;nbsp;관련된&amp;nbsp;파일들을&amp;nbsp;포함합니다.&amp;nbsp;가상&amp;nbsp;환경은&amp;nbsp;파이썬&amp;nbsp;프로젝트에서&amp;nbsp;패키지&amp;nbsp;종속성을&amp;nbsp;분리하고&amp;nbsp;프로젝트별로&amp;nbsp;독립된&amp;nbsp;파이썬&amp;nbsp;환경을&amp;nbsp;구성하는&amp;nbsp;데&amp;nbsp;사용됩니다.&amp;nbsp;가상&amp;nbsp;환경을&amp;nbsp;생성하면&amp;nbsp;해당&amp;nbsp;환경에&amp;nbsp;필요한&amp;nbsp;패키지들을&amp;nbsp;설치하고,&amp;nbsp;프로젝트에서는&amp;nbsp;가상&amp;nbsp;환경에&amp;nbsp;있는&amp;nbsp;패키지들을&amp;nbsp;사용합니다.&amp;nbsp;venv&amp;nbsp;폴더에는&amp;nbsp;가상&amp;nbsp;환경을&amp;nbsp;설정하는&amp;nbsp;데&amp;nbsp;필요한&amp;nbsp;파일들이&amp;nbsp;저장됩니다. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;Typeshed&amp;nbsp;Stubs: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이&amp;nbsp;폴더는&amp;nbsp;타입&amp;nbsp;힌트(Type&amp;nbsp;Hinting)를&amp;nbsp;위한&amp;nbsp;stub&amp;nbsp;파일들을&amp;nbsp;포함합니다.&amp;nbsp;타입&amp;nbsp;힌트는&amp;nbsp;파이썬&amp;nbsp;코드에서&amp;nbsp;변수와&amp;nbsp;함수의&amp;nbsp;타입&amp;nbsp;정보를&amp;nbsp;제공하여&amp;nbsp;정적&amp;nbsp;타입&amp;nbsp;검사를&amp;nbsp;지원하고&amp;nbsp;가독성을&amp;nbsp;높여줍니다.&amp;nbsp;Typeshed는&amp;nbsp;외부&amp;nbsp;라이브러리들의&amp;nbsp;타입&amp;nbsp;정보를&amp;nbsp;포함하는&amp;nbsp;저장소입니다.&amp;nbsp;Typeshed&amp;nbsp;Stubs&amp;nbsp;폴더에는&amp;nbsp;다양한&amp;nbsp;외부&amp;nbsp;라이브러리들의&amp;nbsp;타입&amp;nbsp;정보가&amp;nbsp;포함된&amp;nbsp;stub&amp;nbsp;파일들이&amp;nbsp;저장됩니다.&amp;nbsp;이러한&amp;nbsp;stub&amp;nbsp;파일들은&amp;nbsp;IDE나&amp;nbsp;정적&amp;nbsp;타입&amp;nbsp;검사&amp;nbsp;도구&amp;nbsp;등에서&amp;nbsp;사용되어&amp;nbsp;코드&amp;nbsp;편집기에서&amp;nbsp;타입&amp;nbsp;힌트를&amp;nbsp;제공하고&amp;nbsp;정확성을&amp;nbsp;검증할&amp;nbsp;수&amp;nbsp;있도록&amp;nbsp;도와줍니다.&amp;nbsp;타입&amp;nbsp;힌트는&amp;nbsp;코드의&amp;nbsp;가독성과&amp;nbsp;유지보수성을&amp;nbsp;높여주는&amp;nbsp;중요한&amp;nbsp;요소입니다. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이러한 &quot;External Libraries&quot; 폴더의 하위 폴더들은 파이썬 프로젝트에서 사용되는 외부 라이브러리와 관련된 파일들을구성합니다.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 이 파일들은 프로젝트에서 필요한 기능을 제공하거나 확장성을 향상시키는 데 도움을 주는 역할을 합니다. 폴더 구조와 파일들은 개발 환경 및 프로젝트 설정에 따라 다를 수 있지만, 보통 이러한 구성을 갖는 프로젝트에서는 외부 라이브러리의 설치와 관리, 타입 정보 제공, 실행에 필요한 파일들을 포함하는 역할을 수행합니다.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;참고 :&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;- http://www.jaided.ai/easyocr/documentation/&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>◽ Jaided EasyOCR</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/914</guid>
      <comments>https://whitekeyboard.tistory.com/914#entry914comment</comments>
      <pubDate>Sun, 14 May 2023 18:51:21 +0900</pubDate>
    </item>
    <item>
      <title>[Python] Naming 법칙과 관념적인 것들 정리 ex) 카멜 케이스(camelCase), 스네이크 케이스(snake_case), 파스칼 케이스(PascalCase) And '(single quotation mark)와 &amp;quot;(double quotation mark)</title>
      <link>https://whitekeyboard.tistory.com/912</link>
      <description>&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;들어가며...&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 자바에서도 많은 법칙이 있지만, 문법적으로 강제하지는 않는다. 물론 다른 언어도 마찬가지다. 변수명을 카멜 케이스(camelCase)를 이용해서 한다던지&amp;nbsp;스네이크 케이스(snake_case)를 쓴다던지, 이 외에도 많지만 대게 자바에서는 카멜 케이스를 이용한다. 이러한 여러 가지 법칙을 알아야 오픈 소스나 이런 것들을 익숙하게 보고 좀 더 코드를 구조적으로 볼 수 있는데, 파이썬에도 이러한 것들이 있는지 정리하려고 한다.&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;1. 파이썬은 &lt;span style=&quot;color: #0593d3;&quot;&gt;snake_case&lt;/span&gt;, &lt;span style=&quot;color: #ee2323;&quot;&gt;PascalCase&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 파이썬에서는 주로 변수명을 표기할 때 스네이크 케이스를 사용하며, 여러 단어가 올 때에는 언더바(_)를 이용해서 구분한다. 그리고 파이썬에서는 &lt;span style=&quot;color: #0593d3;&quot;&gt;&lt;b&gt;거의 대부분을 스네이크 케이스&lt;/b&gt;&lt;/span&gt;를 사용하는데, 변수명 뿐만 아니라 함수명, 모듈명 등 여러 가지 이름을 지정할 때도 이러한 표기법을 사용하는 것이 관례라고 한다. &lt;span style=&quot;color: #ee2323;&quot;&gt;&lt;b&gt;다만, 클래스는 파스칼 케이스&lt;/b&gt;&lt;/span&gt;(PascalCase)를 사용한다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;h2 style=&quot;color: #000000; text-align: start;&quot; data-ke-size=&quot;size26&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;2. '(single quotation mark)와 &quot;(double quotation mark)&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR'; color: #333333; text-align: start;&quot;&gt;&amp;nbsp;자바에 익숙한 개발자가 파이썬에서 또 느끼는 것이 &quot;와 '의 인식에 차이가 있는데 파이썬에서는 둘을 구분하지 않는다. 둘 다 사용해도 똑같이 작동한다. 하지만 자바에서는 문자열과 문자로 인식하기 때문에 구분해야 한다는 차이점도 존재했다.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;633&quot; data-origin-height=&quot;140&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/lfGIb/btsf3raiSx9/z4ngYjTKf2J4CkWY4onObK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/lfGIb/btsf3raiSx9/z4ngYjTKf2J4CkWY4onObK/img.png&quot; data-alt=&quot;Java Code&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/lfGIb/btsf3raiSx9/z4ngYjTKf2J4CkWY4onObK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FlfGIb%2Fbtsf3raiSx9%2Fz4ngYjTKf2J4CkWY4onObK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;366&quot; height=&quot;81&quot; data-origin-width=&quot;633&quot; data-origin-height=&quot;140&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;Java Code&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;2153&quot; data-origin-height=&quot;131&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/dyK6dQ/btsfPEblbMu/G2DLhtzXu4DqGWqFhZRSkk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/dyK6dQ/btsfPEblbMu/G2DLhtzXu4DqGWqFhZRSkk/img.png&quot; data-alt=&quot;Python Code&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dyK6dQ/btsfPEblbMu/G2DLhtzXu4DqGWqFhZRSkk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdyK6dQ%2FbtsfPEblbMu%2FG2DLhtzXu4DqGWqFhZRSkk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2153&quot; height=&quot;131&quot; data-origin-width=&quot;2153&quot; data-origin-height=&quot;131&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;Python Code&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR'; color: #333333; text-align: start;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;참고 :&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;- https://velog.io/@jp-share/Coding-%ED%91%9C%EA%B8%B0%EB%B2%95-%EC%B9%B4%EB%A9%9C%EC%BC%80%EC%9D%B4%EC%8A%A4-%ED%8C%8C%EC%8A%A4%EC%B9%BC%EC%BC%80%EC%9D%B4%EC%8A%A4-%EC%8A%A4%EB%84%A4%EC%9D%B4%ED%81%AC%EC%BC%80%EC%9D%B4%EC%8A%A4&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;-&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>◽ Python</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/912</guid>
      <comments>https://whitekeyboard.tistory.com/912#entry912comment</comments>
      <pubDate>Wed, 10 May 2023 21:15:31 +0900</pubDate>
    </item>
    <item>
      <title>[Python] __init__ 와 __init__.py 의미는 무엇일까?</title>
      <link>https://whitekeyboard.tistory.com/911</link>
      <description>&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;들어가며...&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 자바 개발자 입장에서 가장 이해가 안되는 대목 중 하나인데, 폴더를 만들고 그 안에 __init__.py를 만들어져 있는 모습을 봤는데, 너무 생소했다. 매직 메소드(magic method) 중 하나인 __init__과도 헷갈린다. 이 헷갈림을 정리하려고 이 글에 간단히 정리했다.&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;1. __init__ 뭘까?&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; &quot;__init__&quot;을 메서드라고 칭하고 이는 클래스(Class)에서 사용되는 특별한 메서드라고 하며, 클래스의 인스턴스가 생성될 때 자동으로 호출되는 구조라고 한다. 즉, 클래스가 인스턴스화될 때 호출되는 생성자(constructor) 메서드라고 볼 수 있다. &lt;span style=&quot;color: #ee2323;&quot;&gt;&lt;b&gt;자바&lt;/b&gt;&lt;/span&gt;에 비유하자면, 클래스의&lt;span style=&quot;color: #ee2323;&quot;&gt;&lt;b&gt; &quot;Constructor&quot;&lt;/b&gt;&lt;/span&gt;라고 생각하면 이해가 바로 된다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 아래의 코드를 보면, Rectangle 클래스의 인스턴스를 생성한 후, width와 height 인스턴스 변수를 출력하고, area 메서드를 호출하여 면적을 출력하고, 이를 통해 __init__ 메서드가 인스턴스 변수를 초기화하는 데 사용함을 볼 수 있는 코드이다.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0;text-align:left&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;Rectangle:&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(&lt;span style=&quot;color:#4be6fa&quot;&gt;self&lt;/span&gt;,&amp;nbsp;width,&amp;nbsp;height):&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;self&lt;/span&gt;.width&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;width&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;self&lt;/span&gt;.height&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;height&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;def&lt;/span&gt;&amp;nbsp;area(&lt;span style=&quot;color:#4be6fa&quot;&gt;self&lt;/span&gt;):&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;self&lt;/span&gt;.width&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;self&lt;/span&gt;.height&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;#&amp;nbsp;인스턴스&amp;nbsp;생성&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;rect&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;Rectangle(&lt;span style=&quot;color:#c10aff&quot;&gt;5&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;10&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;#&amp;nbsp;너비와&amp;nbsp;높이&amp;nbsp;출력&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;print&lt;/span&gt;(f&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;Width:&amp;nbsp;{rect.width}&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;print&lt;/span&gt;(f&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;Height:&amp;nbsp;{rect.height}&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;#&amp;nbsp;면적&amp;nbsp;출력&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;print&lt;/span&gt;(f&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;Area:&amp;nbsp;{rect.area()}&quot;&lt;/span&gt;)&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;color:white&quot;&gt;&lt;span style=&quot;font-size:9px;word-break:normal;background-color:#4f4f4f;color:white;border-radius:10px;padding:1px&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;아래는 결과&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0;text-align:left&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;Width:&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;5&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;Height:&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;10&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;Area:&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;50&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;color:white&quot;&gt;&lt;span style=&quot;font-size:9px;word-break:normal;background-color:#4f4f4f;color:white;border-radius:10px;padding:1px&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&amp;nbsp;&lt;/h4&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;2. 그럼 __init__.py 뭘까?&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 파이썬에서 패키지는 하나 이상의 모듈을 가진 디렉토리라고 볼 수 있는데, 이 패키지를 이용하면 모듈을 더욱 체계적으로 관리하고, 이름 충돌을 방지하며, 코드 재사용성을 높일 수 있다고 한다. 이때, 패키지의 초기화 작업을 수행하는 데 사용되는 파일이 __init__.py라고 정의되어 있다. 다시 말하면 __init__.py&amp;nbsp;파일은&amp;nbsp;&lt;u&gt;해당 패키지를 파이썬 인터프리터에게 패키지로 인식시키는 데 사용&lt;/u&gt;되는 수단이라고 볼 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 역시나 가장 이해하기 쉬운건 코드를 봐야한다. &lt;span style=&quot;color: #333333; text-align: start;&quot;&gt;&amp;nbsp;아래의 코드를 보면, 패키지에 포함된 module1과 module2 모듈을 로드하고, 해당 모듈에서 정의된 모든 클래스와 함수를 패키지의 네임스페이스에 포함하는데, 이렇게 하면 다른 모듈에서 mypackage 패키지에 포함된 모듈의 함수나 클래스를 직접 참조할 수 있게 된다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0;text-align:left&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;mypackage&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;__init__.py&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;module1.py&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;module2.py&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;#&amp;nbsp;mypackage/__init__.py&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;from&lt;/span&gt;&amp;nbsp;.module1&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;*&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;from&lt;/span&gt;&amp;nbsp;.module2&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;*&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;color:white&quot;&gt;&lt;span style=&quot;font-size:9px;word-break:normal;background-color:#4f4f4f;color:white;border-radius:10px;padding:1px&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 결국엔 이 __init__.py를 사용하는 이유는 패키지 구조를 효율적으로 사용하기 위함이다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;추가적으로 설명을 더 하자면, &quot;네임 스페이스&quot;라는 용어인데 위 예시 코드를 볼 때. 다른 python file에서 import 할 때, 개별적으로 module1.py, module2.py import하는 것이 아니라 mypackage..module1으로 가져올 수 있으니 파일명이 겹쳐도 구분할 수 있다는 개념에서 나온 것 같은데... 뭐.. 그렇다고 한다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;참고 :&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;- https://chancoding.tistory.com/207&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>◽ Python</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/911</guid>
      <comments>https://whitekeyboard.tistory.com/911#entry911comment</comments>
      <pubDate>Wed, 10 May 2023 20:00:23 +0900</pubDate>
    </item>
    <item>
      <title>[Python] IndentationError, 들여쓰기와 동적 타입 개념 정리</title>
      <link>https://whitekeyboard.tistory.com/910</link>
      <description>&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;IndentationError&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 파이썬에서 들여쓰기를 제대로하지 않으면, IndentationError가 발생한다. 자바에서는 들여쓰기를 마음대로해도 grammar에 문제가 없었는데, python에서는 그렇지 않다. 그래서 이러한 문법들을 조금씩 이 글에서 정리하려고 한다.&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;1. 들여쓰기가 코드에서 어떻게 사용되나?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 코드를 보는 것이 가장 직관적이지 싶다. [아래 코드 참고]&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;4&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;6&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;8&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;9&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;10&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;11&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;12&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;13&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;14&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;15&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;16&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;17&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;18&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;19&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;20&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;21&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;22&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999; font-family: 'Noto Serif KR';&quot;&gt;#&amp;nbsp;조건문&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;if&lt;/span&gt;&amp;nbsp;조건식:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;조건식이&amp;nbsp;참(True)인&amp;nbsp;경우&amp;nbsp;실행되는&amp;nbsp;코드&amp;nbsp;블록&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;else&lt;/span&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;조건식이&amp;nbsp;거짓(False)인&amp;nbsp;경우&amp;nbsp;실행되는&amp;nbsp;코드&amp;nbsp;블록&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999; font-family: 'Noto Serif KR';&quot;&gt;#&amp;nbsp;for문&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;변수&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;리스트:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;실행할&amp;nbsp;코드&amp;nbsp;블록&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999; font-family: 'Noto Serif KR';&quot;&gt;#&amp;nbsp;while문&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;while&lt;/span&gt;&amp;nbsp;조건식:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;실행할&amp;nbsp;코드&amp;nbsp;블록&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999; font-family: 'Noto Serif KR';&quot;&gt;#&amp;nbsp;함수&amp;nbsp;정의&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;함수명(매개변수):&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;함수&amp;nbsp;본문&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999; font-family: 'Noto Serif KR';&quot;&gt;#&amp;nbsp;클래스&amp;nbsp;정의&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;class&lt;/span&gt;&amp;nbsp;클래스명:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;클래스&amp;nbsp;멤버&amp;nbsp;정의&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR'; color: #333333; text-align: start;&quot;&gt;&amp;nbsp; 클래스를 조금 더 자세히 보자면, 아래를 참고&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;4&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;6&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;8&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;9&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Dog:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;,&amp;nbsp;name):&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;.name&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;name&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;bark(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;):&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;멍멍&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;my_dog&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;Dog(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;댕댕이&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;my_dog.bark()&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;2. 동적 타입&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 자바에서도 11버전부터 var라는 동적 타입을 지원하는데, 파이썬에서는 기본적인 철학이 동적 타이핑으로 되어있다. 하지만, 자바에서는 var로 선언하면 위에서 결정된 타입은 다시 변경이 되지 않지만 파이썬에서는 가능하다. 물론 자바에서도 최상위 클래스인 Object를 사용하면 동적으로 가능하긴 하다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;먼저 자바 샘플 코드를 보면,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0;text-align:left&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;#&amp;nbsp;가능함&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;Object&amp;nbsp;dynamicVariable&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;dynamic&amp;nbsp;variable&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;System&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;out&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;println&lt;/span&gt;(dynamicVariable);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dynamicVariable&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;123&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;System&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;out&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;println&lt;/span&gt;(dynamicVariable);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;#&amp;nbsp;컴파일&amp;nbsp;오류&amp;nbsp;남.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;var&amp;nbsp;dynamicVariable&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;dynamic&amp;nbsp;variable&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;System&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;out&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;println&lt;/span&gt;(dynamicVariable);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dynamicVariable&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;123&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;System&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;out&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;println&lt;/span&gt;(dynamicVariable);&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;color:white&quot;&gt;&lt;span style=&quot;font-size:9px;word-break:normal;background-color:#4f4f4f;color:white;border-radius:10px;padding:1px&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;그리고 파이썬의 샘플 코드를 보면,&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0;text-align:left&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;dynamic_variable&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;dynamic&amp;nbsp;variable&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;print&lt;/span&gt;(dynamic_variable)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;dynamic_variable&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;123&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;print&lt;/span&gt;(dynamic_variable)&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;color:white&quot;&gt;&lt;span style=&quot;font-size:9px;word-break:normal;background-color:#4f4f4f;color:white;border-radius:10px;padding:1px&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;참고 :&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;- http://pythonstudy.xyz/python/article/6-Python-%EC%BD%94%EB%94%A9%EC%9D%98-%EA%B8%B0%EC%B4%88&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>◽ Python</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/910</guid>
      <comments>https://whitekeyboard.tistory.com/910#entry910comment</comments>
      <pubDate>Wed, 10 May 2023 18:48:29 +0900</pubDate>
    </item>
    <item>
      <title>[Python] __name__ 의미는 무엇일까?</title>
      <link>https://whitekeyboard.tistory.com/909</link>
      <description>&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;__name__&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 메인을 자바로 썼던 개발자가 파이썬을 처음 세팅했을 때, 생소한 __name__ 얘는 뭘까?라는 궁금증으로 정리해 봤고, 이와 비슷한 수준의 의문점들을 이 글에 간략하게 정리하려고 한다.&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;1. &quot;__name__&quot;은 무엇일까?&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 자바에 비유하자면, main 함수다. __name__은 파이썬에서 내장된 특별한 변수로, 모듈의 이름을 저장하는 데 사용되는 것이 가장 기본적인 정의이다. 파이썬에서 __name__은 특별한 속성으로, 현재 모듈의 이름을 나타내는 문자열을 담겨있다고 할 수 있는데, 모듈이 어디에서 import 되었는지에 따라 그 값을 달리할 수 있다.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;아래의 코드를 보면, &quot;This is the main program.&quot;와 &quot;This is a function in example module.&quot;이 출력되는데,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;4&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;6&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;8&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;9&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;10&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999; font-family: 'Noto Serif KR';&quot;&gt;#&amp;nbsp;example.py&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;foo():&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;function&amp;nbsp;in&amp;nbsp;example&amp;nbsp;module.&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;if&lt;/span&gt;&amp;nbsp;__name__&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;__main__&quot;&lt;/span&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;This&amp;nbsp;is&amp;nbsp;the&amp;nbsp;main&amp;nbsp;program.&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foo()&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;else&lt;/span&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;This&amp;nbsp;module&amp;nbsp;was&amp;nbsp;imported.&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;이 아래의 코드는 &quot;This module was imported.&quot;와 &quot;This is a function in example module.&quot;이 출력된다.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;4&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;6&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999; font-family: 'Noto Serif KR';&quot;&gt;#&amp;nbsp;another_module.py&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;example&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;Importing&amp;nbsp;example&amp;nbsp;module.&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;example.foo()&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #333333; letter-spacing: 0px;&quot;&gt;&amp;nbsp; 위의 설명을 더 간단히 요약하자면, __name__은 모듈의 이름을 저장하는 특별한 변수인데, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #ee2323;&quot;&gt;python example.py와 같이 직접 실행이 되면 name에는 모듈 이름이 __main__으로 매핑&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; letter-spacing: 0px;&quot;&gt;이 되고, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #006dd7;&quot;&gt;import 형식으로 사용하면 __name__에 example이 매핑&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; letter-spacing: 0px;&quot;&gt;되는 것으로 보면 된다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;2. 매직 메소드 &quot;__&quot;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR'; color: #333333; text-align: start;&quot;&gt;&amp;nbsp;위 에서 소개한 __name__에 이중 언더바가 있다고해서 매직 메소드로 착각 할 수 있는데, 전혀 다른 개념이고 아래에 주로 볼 수 있는 매직 메소드를 간단히 정리했다.&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;__init__(self, ...) : 객체가 생성될 때 호출되는 생성자 메서드. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;__str__(self): 객체를 문자열로 표현할 때 호출되는 메서드, print(obj)를 호출할 때 출력되는 문자열을 반환. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;__len__(self): 객체의 길이를 반환하는 메서드. len(obj)를 호출할 때 반환값으로 사용. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;__add__(self, other): 두 개의 객체를 더하는 메서드. obj1 + obj2를 호출할 때 사용. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;__getitem__(self, key): 객체의 인덱스나 키를 사용하여 요소에 접근하는 메서드, obj[key]를 호출할 때 사용.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>◽ Python</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/909</guid>
      <comments>https://whitekeyboard.tistory.com/909#entry909comment</comments>
      <pubDate>Tue, 9 May 2023 19:42:30 +0900</pubDate>
    </item>
    <item>
      <title>[VBA] 엑셀에서 정규식 검색하기 : regular expression search</title>
      <link>https://whitekeyboard.tistory.com/908</link>
      <description>&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;환경&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; MicroSoft 365 구독형을 사용중인데, 구독형이라 늘 최신은 유지하고 있다. 그런데 Ctrl+F에 정규식 사용 옵션이 없다. 함수도 인자값에 정규식을 넣어도 오류를 뱉어내고 해서 찾아보니 VBA를 활용하면 되어서 간단히 정리하려고 한다.&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;1. VBA를 열어준다.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 엑셀 화면에서 Alt+F11을 누르면 VBA가 활성화되는데 적용할 엑셀 탭을 더블클릭하면 아래와 같이 코드를 입력할 수 있는 창이 열린다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1805&quot; data-origin-height=&quot;1026&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/m1rIQ/btsd01FOTgc/GFbsOb6K8kjGPdgKi7c3fK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/m1rIQ/btsd01FOTgc/GFbsOb6K8kjGPdgKi7c3fK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/m1rIQ/btsd01FOTgc/GFbsOb6K8kjGPdgKi7c3fK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fm1rIQ%2Fbtsd01FOTgc%2FGFbsOb6K8kjGPdgKi7c3fK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1805&quot; height=&quot;1026&quot; data-origin-width=&quot;1805&quot; data-origin-height=&quot;1026&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;4&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;6&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;8&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;9&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;10&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;11&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;12&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;13&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;14&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;15&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;16&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;17&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;18&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;19&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;20&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;21&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;22&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;23&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;24&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;25&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;Sub&lt;/span&gt;&amp;nbsp;RegExSearch()&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;inputRange&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;As&lt;/span&gt;&amp;nbsp;Range&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;pattern&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;cell&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;As&lt;/span&gt;&amp;nbsp;Range&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;Set&lt;/span&gt;&amp;nbsp;inputRange&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;Range(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;A1:F18&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pattern&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;[f]&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;For&lt;/span&gt;&amp;nbsp;Each&amp;nbsp;cell&amp;nbsp;In&amp;nbsp;inputRange&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;If&lt;/span&gt;&amp;nbsp;RegExMatch(cell.Value,&amp;nbsp;pattern)&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cell.Font.Color&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;vbRed&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;Next&lt;/span&gt;&amp;nbsp;cell&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;Function&amp;nbsp;RegExMatch(&lt;span style=&quot;color: #ff3399;&quot;&gt;ByVal&lt;/span&gt;&amp;nbsp;inputText&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;ByVal&lt;/span&gt;&amp;nbsp;pattern&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;Boolean&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;regex&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;Object&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;Set&lt;/span&gt;&amp;nbsp;regex&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;CreateObject(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;VBScript.RegExp&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;regex.pattern&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;pattern&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RegExMatch&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;regex.Test(inputText)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;End&lt;/span&gt;&amp;nbsp;Function&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;2. 설명&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 코드는 F5를 누르면 실행이 되는데, Range는 영역이고, pattern은 정규식 검색할 값을 넣으면 된다, 그리고 조건식에 true가 성립되면 vbRed로 폰트색을 빨간색으로 변경하게끔 만들어 두었다. 아래의 그림 참고.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;807&quot; data-origin-height=&quot;167&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/LBRpy/btsd15H0XRW/ntqp390iqQWGtiH2qnge60/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/LBRpy/btsd15H0XRW/ntqp390iqQWGtiH2qnge60/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/LBRpy/btsd15H0XRW/ntqp390iqQWGtiH2qnge60/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FLBRpy%2Fbtsd15H0XRW%2Fntqp390iqQWGtiH2qnge60%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;807&quot; height=&quot;167&quot; data-origin-width=&quot;807&quot; data-origin-height=&quot;167&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;2793&quot; data-origin-height=&quot;1192&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/d8ZthG/btsejLnJ5IA/sGu1aHX3mXPy66f1YJwz80/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/d8ZthG/btsejLnJ5IA/sGu1aHX3mXPy66f1YJwz80/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/d8ZthG/btsejLnJ5IA/sGu1aHX3mXPy66f1YJwz80/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fd8ZthG%2FbtsejLnJ5IA%2FsGu1aHX3mXPy66f1YJwz80%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2793&quot; height=&quot;1192&quot; data-origin-width=&quot;2793&quot; data-origin-height=&quot;1192&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;3. 평가.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR'; letter-spacing: 0px;&quot;&gt;&amp;nbsp; 최신 구독형 오피스 제품인데도 이런 기본 기능이 없으니, 코드를 작성해서 사용해야하는게 불편하지만, 커스텀이 되기 때문에 개발자 입장에서는 좋은 발견이라고 생각한다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;참고 :&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;- https://support.intermedia.com/app/articles/detail/a_id/23648/~/backup-for-microsoft-365%3A-how-to-use-advanced-search-capabilities&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;- https://www.ablebits.com/office-addins-blog/excel-regex-formulas/&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>◽ VB &amp;amp; VBA</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/908</guid>
      <comments>https://whitekeyboard.tistory.com/908#entry908comment</comments>
      <pubDate>Mon, 8 May 2023 10:10:18 +0900</pubDate>
    </item>
    <item>
      <title>[Java] regular expression : &amp;quot;hi.*&amp;quot;와 &amp;quot;hi.+&amp;quot;와 &amp;quot;hi*&amp;quot; 차이는?</title>
      <link>https://whitekeyboard.tistory.com/907</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a href=&quot;https://whitekeyboard.tistory.com/906&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;2023.05.03 - [◽ Java language/Java Regular Expression] - [Java] 정규식 regular expression&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;정규식&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 이전에 글을 정리했어도, 스스로 질문 사항들이 많이 생겨서 혼자서 정리하려고 간단하게 글을 남긴다.&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;차이점 &quot;hi.*&quot;, &quot;hi.+&quot;, &quot;hi*&quot;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 정규 표현식부터 정리를 간단히 하자면,&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;마침표(.): 어떤 문자 하나를 의미.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;별표(*): 앞의 문자나 문자열이 0개 이상 나타날 수 있다는 것을 의미. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;더하기(+): 앞의 문자나 문자열이 1개 이상 나타나야 한다는 것을 의미.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 그러나 가장 직관적으로 이해하기 쉬운건 역시나 예시가 있어야한다.&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi*&quot;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi&quot;: &quot;i&quot; 문자가 0개 이상 나타나므로 일치.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hii&quot;: &quot;i&quot; 문자가 0개 이상 나타나므로 일치.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hiiii&quot;: &quot;i&quot; 문자가 0개 이상 나타나므로 일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;ht&quot;: &quot;i&quot; 문자가 나타나지 않으므로 불일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hit&quot;: &quot;hi&quot; 다음에 &quot;i&quot; 문자가 나타나므로 일치. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi.*&quot;&lt;/span&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi&quot;: 어떤 문자가 0개 이상 나타날 수 있으므로 일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi there&quot;: &quot;hi&quot; 다음에 공백을 포함한 어떤 문자가 0개 이상 나타날 수 있으므로 일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi123&quot;: &quot;hi&quot; 다음에 숫자가 0개 이상 나타날 수 있으므로 일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;ht&quot;: &quot;hi&quot; 다음에 어떤 문자도 나타나지 않으므로 불일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hit&quot;: &quot;hi&quot; 다음에 &quot;i&quot; 문자가 0개 이상 나타날 수 있으므로 일치. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi.+&quot; &lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi there&quot;: &quot;hi&quot; 다음에 하나 이상의 문자가 나타나므로 일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hiiii&quot;: &quot;hi&quot; 다음에 하나 이상의 문자가 나타나므로 일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi123&quot;: &quot;hi&quot; 다음에 하나 이상의 문자가 나타나므로 일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;hi&quot;: &quot;i&quot; 문자가 하나 이상 나타나지 않으므로 불일치. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&quot;ht&quot;: &quot;hi&quot; 다음에 어떤 문자도 나타나지 않으므로 불일치.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>◽ Java language/Java Regular Expression</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/907</guid>
      <comments>https://whitekeyboard.tistory.com/907#entry907comment</comments>
      <pubDate>Wed, 3 May 2023 16:16:33 +0900</pubDate>
    </item>
    <item>
      <title>[Java] 정규식 regular expression</title>
      <link>https://whitekeyboard.tistory.com/906</link>
      <description>&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;정규식&lt;span style=&quot;color: #333333; text-align: start;&quot;&gt;(regular expressions)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 자바에서 정규식(regular expressions)을 사용하는 방법에 대해 간단히 알아보려고 한다. 정규식은 문자열 패턴을 정의하고 검색, 대체 및 분할하는 데 유용한 도구인데 자바에서는 java.util.regex 패키지를 사용하여 정규식을 처리할 수 있기 때문에 정규식을 어떻게 사용하고 정규식이 어떻개 매칭되는지 알아야 문자열 검색이나 문자열 처리에 수월하게 접근할 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 이 글에서는 Pattern과 Matcher 클래스를 사용하는 부분을 집중적으로 정리할 예정인데, 사실 자바에서 정규식을 사용하면 이 2가지 클래스를 이용하는게 대다수이다.&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;1. 정규식&amp;nbsp;패턴&amp;nbsp;생성하기&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 자바에서 정규식 패턴을 생성하려면 Pattern 클래스의 compile() 메서드를 사용하는데, 이 메서드는 정규식 패턴 문자열을 입력 받아 Pattern 객체를 반환하는 작업을 하는 메서드이다. &lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR'; color: #333333; text-align: start;&quot;&gt;&amp;nbsp; 예제에서는 숫자 3개, 하이픈, 숫자 2개, 하이픈, 숫자 4개로 이루어진 문자열 패턴(예: 123-45-6789)을 정의한 것입니다.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;4&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;6&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;8&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;java.util.regex.Pattern;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;background-color: #272727; color: #f0f0f0; text-align: left;&quot;&gt;Test&lt;/span&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;void&lt;/span&gt;&amp;nbsp;main(&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;[]&amp;nbsp;args)&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;&amp;nbsp;regex&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;\\d{3}-\\d{2}-\\d{4}&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Pattern&amp;nbsp;pattern&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;Pattern.compile(regex);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;color: #333333; font-family: 'Noto Serif KR'; letter-spacing: 0px;&quot;&gt;&lt;b&gt;2. 패턴과&amp;nbsp;일치하는&amp;nbsp;문자열&amp;nbsp;찾기&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #333333; text-align: start;&quot;&gt;&amp;nbsp;Pattern 객체를 사용하여 문자열에서 패턴과 일치하는 부분을 찾으려면 Matcher 클래스를 사용해야하고 Pattern 객체의 matcher() 메서드를 사용하여 Matcher 객체를 생성할 수 있다.&lt;/span&gt;&lt;span style=&quot;color: #333333; text-align: start;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #333333; text-align: start;&quot;&gt;&amp;nbsp; 예제에서는 input 문자열에서 정규식 패턴과 일치하는 부분을 찾고, matcher.find() 메서드를 사용하여 일치하는 부분이 있는지 확인하고, matcher.group() 메서드를 사용하여 일치하는 부분을 가져오는 예제인데 아래를 참고.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; text-align: start;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;4&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;6&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;8&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;9&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;10&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;11&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;12&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;13&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;14&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;15&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;16&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;17&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;18&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;java.util.regex.Pattern;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;java.util.regex.Matcher;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;class&lt;/span&gt; Test {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;void&lt;/span&gt;&amp;nbsp;main(&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;[]&amp;nbsp;args)&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;&amp;nbsp;regex&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;\\d{3}-\\d{2}-\\d{4}&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Pattern&amp;nbsp;pattern&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;Pattern.compile(regex);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;&amp;nbsp;input&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;My&amp;nbsp;Social&amp;nbsp;Security&amp;nbsp;Number&amp;nbsp;is&amp;nbsp;123-45-6789&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Matcher&amp;nbsp;matcher&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;pattern.matcher(input);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(matcher.find())&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;System&lt;/span&gt;.&lt;span style=&quot;color: #4be6fa;&quot;&gt;out&lt;/span&gt;.&lt;span style=&quot;color: #4be6fa;&quot;&gt;println&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;Found&amp;nbsp;a&amp;nbsp;match:&amp;nbsp;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;+&lt;/span&gt;&amp;nbsp;matcher.group());&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;else&lt;/span&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;System&lt;/span&gt;.&lt;span style=&quot;color: #4be6fa;&quot;&gt;out&lt;/span&gt;.&lt;span style=&quot;color: #4be6fa;&quot;&gt;println&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;No&amp;nbsp;match&amp;nbsp;found&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;3. 정규식 주요 표현&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;문자열&amp;nbsp;매칭&lt;/span&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;단순 문자: 정확히 일치하는 문자 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;마침표(.):&amp;nbsp;임의의&amp;nbsp;한&amp;nbsp;문자 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;대괄호([]):&amp;nbsp;대괄호&amp;nbsp;안에&amp;nbsp;있는&amp;nbsp;문자&amp;nbsp;중&amp;nbsp;하나와&amp;nbsp;일치 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;하이픈(-):&amp;nbsp;범위를&amp;nbsp;표시하는&amp;nbsp;데&amp;nbsp;사용 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;캐럿(^):&amp;nbsp;문자열이나&amp;nbsp;문자&amp;nbsp;집합의&amp;nbsp;처음과&amp;nbsp;일치 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;달러 기호($): 문자열이나 문자 집합의 끝과 일치&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;반복 &lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;별표(*): 0회 이상 반복&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;더하기(+): 1회 이상 반복&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;물음표(?): 0회 또는 1회 반복&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;중괄호({}): 특정 회수 반복&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;특수 문자&lt;/span&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;백슬래시(): 다른 특수 문자와 조합하여 특별한 의미를 갖게 함 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;수직&amp;nbsp;막대(|):&amp;nbsp;OR&amp;nbsp;조건 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;괄호(()): 그룹핑&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;문자&amp;nbsp;클래스 &lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;\d:&amp;nbsp;숫자와&amp;nbsp;일치 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;\D:&amp;nbsp;숫자가&amp;nbsp;아닌&amp;nbsp;문자와&amp;nbsp;일치 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;\w:&amp;nbsp;알파벳,&amp;nbsp;숫자,&amp;nbsp;밑줄과&amp;nbsp;일치 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;\W:&amp;nbsp;알파벳,&amp;nbsp;숫자,&amp;nbsp;밑줄이&amp;nbsp;아닌&amp;nbsp;문자와&amp;nbsp;일치 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;\s:&amp;nbsp;공백&amp;nbsp;문자와&amp;nbsp;일치 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;\S: 공백 문자가 아닌 문자와 일치&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;전방탐색과&amp;nbsp;후방탐색 &lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;전방탐색(?=):&amp;nbsp;일치하는&amp;nbsp;문자열&amp;nbsp;바로&amp;nbsp;앞에서&amp;nbsp;검색 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;후방탐색(?&amp;lt;=):&amp;nbsp;일치하는&amp;nbsp;문자열&amp;nbsp;바로&amp;nbsp;뒤에서&amp;nbsp;검색&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;참고 :&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;-&amp;nbsp; https://codechacha.com/ko/java-regex/&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;- https://www.w3schools.com/java/java_regex.asp&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>◽ Java language/Java Regular Expression</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/906</guid>
      <comments>https://whitekeyboard.tistory.com/906#entry906comment</comments>
      <pubDate>Wed, 3 May 2023 15:43:39 +0900</pubDate>
    </item>
    <item>
      <title>[Visual Studio IDE] KeyMap - Optimize 종류 정리</title>
      <link>https://whitekeyboard.tistory.com/905</link>
      <description>&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;KeyMap&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 보통 IDE를 접하면 가장 먼저하는게 다른 IDE에서 사용하던 비슷한 기능의 핫키가 있는지 찾는 것인데, 익숙해지기 위해서는 계속 사용해야된다. 일단 까먹지 않게 정리하려고 한다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;환경&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;- Visual Studio 2022 Enterprise&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp;- Default KeyMap&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;1. Optimize : Remove and Sort Usings&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; &quot;Ctrl + R, Ctrl + G&quot; 를 눌러. 아래와 자동으로 같이 제거한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;Screenshot_1.png&quot; data-origin-width=&quot;881&quot; data-origin-height=&quot;385&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/wewOZ/btr8MpZqxch/OTrbmWrBEQFdUZVJnsJSi1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/wewOZ/btr8MpZqxch/OTrbmWrBEQFdUZVJnsJSi1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/wewOZ/btr8MpZqxch/OTrbmWrBEQFdUZVJnsJSi1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FwewOZ%2Fbtr8MpZqxch%2FOTrbmWrBEQFdUZVJnsJSi1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;549&quot; height=&quot;240&quot; data-filename=&quot;Screenshot_1.png&quot; data-origin-width=&quot;881&quot; data-origin-height=&quot;385&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;2. Optimize : Format Documents&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; &quot;Ctrl + K, Ctrl + D&quot;를 눌러. 아래와 같이 자동으로 포맷에 맞게 정렬해준다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;Screenshot_2.png&quot; data-origin-width=&quot;1795&quot; data-origin-height=&quot;538&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/ezRUIX/btr8Xz0UYh7/TmbyK2NGi1r43VPVXat70k/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/ezRUIX/btr8Xz0UYh7/TmbyK2NGi1r43VPVXat70k/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/ezRUIX/btr8Xz0UYh7/TmbyK2NGi1r43VPVXat70k/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FezRUIX%2Fbtr8Xz0UYh7%2FTmbyK2NGi1r43VPVXat70k%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;780&quot; height=&quot;234&quot; data-filename=&quot;Screenshot_2.png&quot; data-origin-width=&quot;1795&quot; data-origin-height=&quot;538&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;3. Optimize : Remove&amp;nbsp;and&amp;nbsp;Sort&amp;nbsp;Usings&amp;nbsp;(ReSharper)&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; &quot;Ctrl + Alt + O&quot; 1번, 2번 기능을 한번에 이용할 수 있다. (jetbrains 사에서 만든 플러그인)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;span&gt;P. S. : 설정을 잘못한 탓인지 Visual Studio와 키 충돌 때문인지 &lt;span style=&quot;color: #333333; text-align: start;&quot;&gt;Ctrl + Alt + O가 설치 후 작동을 안한다. 좀 더 사용해보고 다시 정리를 해야겠다.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1882&quot; data-origin-height=&quot;1039&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bcDE0U/btr8PYNvkeQ/3vwPIqR0LHwRJZdMHqoTTk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bcDE0U/btr8PYNvkeQ/3vwPIqR0LHwRJZdMHqoTTk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bcDE0U/btr8PYNvkeQ/3vwPIqR0LHwRJZdMHqoTTk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbcDE0U%2Fbtr8PYNvkeQ%2F3vwPIqR0LHwRJZdMHqoTTk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;721&quot; height=&quot;398&quot; data-origin-width=&quot;1882&quot; data-origin-height=&quot;1039&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;참고 : https://learn.microsoft.com/en-us/visualstudio/ide/index-writing-code?view=vs-2022&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>◽ Visual Studio</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/905</guid>
      <comments>https://whitekeyboard.tistory.com/905#entry905comment</comments>
      <pubDate>Mon, 10 Apr 2023 10:33:56 +0900</pubDate>
    </item>
    <item>
      <title>[Git, bash] Rest 명령어 : commit 되돌리기, commit 취소하기</title>
      <link>https://whitekeyboard.tistory.com/904</link>
      <description>&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;Reset 명령어 정리&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 실수로 커밋한 뒤 재빨리 취소를 해야 할 때, 사용하면 좋다. bash를 쓰는 이유는 GUI의 대표 격인 소스 트리에서는 없다. 되돌리기 기능이 있긴 한데 조금 불안정하다.&amp;nbsp; push 한 뒤에만 작동하는 듯하고 어쩔 땐 --hard 옵션으로 작동해 버려 코드가 싹 날아가버리는 참사가 다수 발생한 경험이 있어. 역시나 안전한 Command 기반으로 정리하고자 한다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;1. 직전 커밋 삭제.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 방금 올린 직전 커밋을 삭제하는 방법은 &quot;$ git reset HEAD^&quot;로 수행할 수 있다. 여기서 &quot;HEAD + ^&quot;은 &lt;u&gt;^는 헤드에서 직전&lt;/u&gt;이라는 말이며, &quot;^^&quot;이면 헤드에서 2번째 전을 말한다. &quot;HEAD^&quot;를 사용한다는 가정하에 아래 그림 1-1, 1-2를 참고하면 된다.&amp;nbsp;이 상황의 전제는 아래 그림 1-3이어야 한다. 즉, &quot;&lt;b&gt;원격지에 push를 안 한 상태&lt;/b&gt;&quot;이어야 한다. remote에 push한 경우에도 처리하는 방법은 비슷한데 아래에서 정리할 예정.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;768&quot; data-origin-height=&quot;230&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/k2uk2/btrXC0uZsXC/rE72WTNVdcFwAEGWHecWE0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/k2uk2/btrXC0uZsXC/rE72WTNVdcFwAEGWHecWE0/img.png&quot; data-alt=&quot;그림 1-3&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/k2uk2/btrXC0uZsXC/rE72WTNVdcFwAEGWHecWE0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fk2uk2%2FbtrXC0uZsXC%2FrE72WTNVdcFwAEGWHecWE0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;768&quot; height=&quot;230&quot; data-origin-width=&quot;768&quot; data-origin-height=&quot;230&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;그림 1-3&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1158&quot; data-origin-height=&quot;507&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bqZI9k/btrXFuPM0p4/SSezrQ258EdFe0VRD91Xx1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bqZI9k/btrXFuPM0p4/SSezrQ258EdFe0VRD91Xx1/img.png&quot; data-alt=&quot;그림 1-1 : 명령어 실행 이전 모습&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bqZI9k/btrXFuPM0p4/SSezrQ258EdFe0VRD91Xx1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbqZI9k%2FbtrXFuPM0p4%2FSSezrQ258EdFe0VRD91Xx1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1158&quot; height=&quot;507&quot; data-origin-width=&quot;1158&quot; data-origin-height=&quot;507&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;그림 1-1 : 명령어 실행 이전 모습&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1115&quot; data-origin-height=&quot;496&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/cqIkuv/btrXByMTFzt/LKaKpnxFnaCexrYUrLlqqK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/cqIkuv/btrXByMTFzt/LKaKpnxFnaCexrYUrLlqqK/img.png&quot; data-alt=&quot;그림 1-2 : 명령어 실행 이후 모습&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/cqIkuv/btrXByMTFzt/LKaKpnxFnaCexrYUrLlqqK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcqIkuv%2FbtrXByMTFzt%2FLKaKpnxFnaCexrYUrLlqqK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1115&quot; height=&quot;496&quot; data-origin-width=&quot;1115&quot; data-origin-height=&quot;496&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;그림 1-2 : 명령어 실행 이후 모습&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;2. Mode option : &quot;git reset [&amp;lt;mode&amp;gt;] [&amp;lt;commit&amp;gt;]&quot;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 이 명령어의 옵션은 다양한 문법이 있지만, 주로 쓰는 것들로만 간단히 정리하고자 한다. 위 syntax에서 &amp;lt;mode&amp;gt;에는 아래와 같은 옵션들을 제공한다. &lt;i&gt;&lt;b&gt;주로 쓰는 것만 설명&lt;/b&gt;&lt;/i&gt;을 추가하고 자세한 것은 공식 홈페이지 참고하면 된다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #006dd7;&quot;&gt;(&lt;a style=&quot;color: #006dd7;&quot; href=&quot;https://git-scm.com/docs/git-reset&quot;&gt;https://git-scm.com/docs/git-reset&lt;/a&gt;)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;soft : 커밋을 특정하여 reset하면 삭제되는 커밋들의 변경된 파일을 working repository에 남긴다는 말이다. [그림 2-1]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;mixed : 생략하게 될 경우, 이 값으로 설정이 된다.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;hard : soft와 다르게 [그림 2-1]와 같이 남기지 않고 아예 버린다.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;merge&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;keep&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1202&quot; data-origin-height=&quot;517&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/6PdnZ/btrXCIBhnDI/6WKrRaW8lcRdHBAcjKoJv1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/6PdnZ/btrXCIBhnDI/6WKrRaW8lcRdHBAcjKoJv1/img.png&quot; data-alt=&quot;그림 2-1 : soft&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/6PdnZ/btrXCIBhnDI/6WKrRaW8lcRdHBAcjKoJv1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F6PdnZ%2FbtrXCIBhnDI%2F6WKrRaW8lcRdHBAcjKoJv1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1202&quot; height=&quot;517&quot; data-origin-width=&quot;1202&quot; data-origin-height=&quot;517&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;그림 2-1 : soft&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&lt;b&gt;3. Commit option : &quot;git reset [&amp;lt;mode&amp;gt;] [&amp;lt;commit&amp;gt;]&quot;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;&amp;nbsp; 정확히 말하면, commit 옵션은 아닌데 HEAD로 지칭 할 수도 있고, commit의 hash값으로 특정할 수도 있다는 것을 설명하려고 한다. 그림 3-1에서 직전 커밋이 아닌 head에서 2번째 것까지 reset을 하기 위해서는 2가지 방법이 있다. 참고로 [&amp;lt;mode&amp;gt;] 옵션은 생략 가능하며, default값은 mixted이다.&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;$ git reset --soft HEAD^^^&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;$ git reset --sfot 07b332d&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;아래의 그림 3-1, 3-2를 참고하면, 지정한 커밋까지 reset됨을 알 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;695&quot; data-origin-height=&quot;158&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/rTSLc/btrXBY5xDpA/t01sK2PYjJqx71xJYYw1L1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/rTSLc/btrXBY5xDpA/t01sK2PYjJqx71xJYYw1L1/img.png&quot; data-alt=&quot;그림 3-1 : 명령어 수행 전&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/rTSLc/btrXBY5xDpA/t01sK2PYjJqx71xJYYw1L1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FrTSLc%2FbtrXBY5xDpA%2Ft01sK2PYjJqx71xJYYw1L1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;695&quot; height=&quot;158&quot; data-origin-width=&quot;695&quot; data-origin-height=&quot;158&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;그림 3-1 : 명령어 수행 전&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;616&quot; data-origin-height=&quot;119&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/9eiot/btrXC0u1eFs/WZp13wkSZWJrAYZtcmQbf1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/9eiot/btrXC0u1eFs/WZp13wkSZWJrAYZtcmQbf1/img.png&quot; data-alt=&quot;그림 3-2 : 명령어 수행 후&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/9eiot/btrXC0u1eFs/WZp13wkSZWJrAYZtcmQbf1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F9eiot%2FbtrXC0u1eFs%2FWZp13wkSZWJrAYZtcmQbf1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;616&quot; height=&quot;119&quot; data-origin-width=&quot;616&quot; data-origin-height=&quot;119&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;그림 3-2 : 명령어 수행 후&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;참고 :&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size14&quot;&gt;&lt;span style=&quot;font-family: 'Noto Serif KR';&quot;&gt;- &lt;a href=&quot;https://git-scm.com/docs/git-reset&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://git-scm.com/docs/git-reset (&quot;git-reset&quot; document 공식 홈페이지)&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style6&quot; /&gt;</description>
      <category>◽ Git</category>
      <category>git reset</category>
      <category>Reset</category>
      <author>kkk20000a</author>
      <guid isPermaLink="true">https://whitekeyboard.tistory.com/904</guid>
      <comments>https://whitekeyboard.tistory.com/904#entry904comment</comments>
      <pubDate>Tue, 31 Jan 2023 10:16:57 +0900</pubDate>
    </item>
  </channel>
</rss>