<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>program1472 &amp;gt; 자료실 &amp;gt; JAVA</title>
<link>http://blog.program1472.com/bbs/board.php?bo_table=TB_12</link>
<language>ko</language>
<description>JAVA (2022-07-20 13:09:38)</description>

<item>
<title>[java] [펌] 정규식 패턴 설명 및 예제</title>
<link>http://blog.program1472.com/bbs/board.php?bo_table=TB_12&amp;amp;wr_id=4</link>
<description><![CDATA[<div></div><div style="text-align:center;" align="center"><img src="../../../data/editor/2207/5f2a87a66219a5eb83c3a0620a0aa125_1658290138_9785.png" title="5f2a87a66219a5eb83c3a0620a0aa125_1658290138_9785.png" alt="5f2a87a66219a5eb83c3a0620a0aa125_1658290138_9785.png" /></div><div style="text-align:center;" align="center"><br /></div><br /><br /><div style="margin:0;padding:0;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;line-height:130%;">


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">1.</span> \\p{Digit} : 숫자 제거</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">2.</span> \\p{Space} : 공백 제거</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">3.</span> \\p{Punct} : 특수기호 제거</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">4.</span> . : 하나의 문자를 의미합니다. 즉, ab. 은 abc나 abd가 될 수 있습니다.</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">5.</span> ? : 해당 패턴의 앞에 문자가(1개)없거나 혹은 한개가 존재하는 경우를 의미합니다. 즉, a?c는 abc도 될 수 있고, bc도 될 수 있습니다.</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">6.</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">*</span> : 위와 거의 동일하나 하나 이상의 문자를 의미하게 됩니다. 즉, ab<span style="color:#0086b3;"></span><span style="color:#a71d5d;">*</span>는 aaa도 ab도 될 수 있다는 의미입니다.</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">7.</span> ^ : 문자열의 시작을 의미합니다. 즉, ^a는 a로 시작되는 문자를 검색하게 됩니다.</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">8.</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">+</span> : 앞의 문자가 하나이상의 반복을 의미합니다. 즉, ab<span style="color:#0086b3;"></span><span style="color:#a71d5d;">+</span>는 abbbb가 될 수도 있다는 의미입니다.</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">9.</span> [^] : 괄호안의 형식을 제외한다는 의미입니다. 즉, [^a]bc는 a를 제외한 bc, bcd등을 나타냅니다.<span style="color:#0099cc;">10.</span> $ 문자열의 끝을 의미합니다. 즉, ab$가 되는 경우 반드시 b로 끝나는 문자를 나타냅니다.</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">11.</span> [ ] : 괄호안의 형식이 일치하는 경우를 나타냅니다. 즉, [ab]는 a,b,ab모두가 일치하게 됩니다.</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">12.</span> ( ) : ()안의 내용을 하나의 묶음으로 사용합니다. 즉, (ab)<span style="color:#0086b3;"></span><span style="color:#a71d5d;">+</span>는 위 <span style="color:#0086b3;"></span><span style="color:#a71d5d;">+</span>에 따라 ababab등을 나타냅니다.</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">13.</span> { } : 안의 숫자에 따른 반복개수를 의미합니다. 즉, ab{<span style="color:#0099cc;">2</span>}는 abab를 나타냅니다.</div>


                    <div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#0099cc;">14.</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">|</span> : or연산자와 동일합니다. 즉, a<span style="color:#0086b3;"></span><span style="color:#a71d5d;">|</span>b<span style="color:#0086b3;"></span><span style="color:#a71d5d;">|</span>c 는 a,b,c,abc모두가 될 수 있습니다.</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><br /></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><br /></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><br /></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><br /></div>


                </div><div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);"> * 패턴 정의</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);"> * @author lsh</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);"> *</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);"> */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">class</span> PatternDefine {</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     *  전화번호 검색 패턴 02-472-2012 024722012</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_PHONE <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"(\\(?\\d{2,3}\\)?-?\\d{3,4}-?\\d{4})|(\\d{9,11})"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 읍,면,동 구분</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ADDRESS_UM_MYUN_DONG <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"(\uC74D)|(\uBA74)|(\uB3D9)"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 시,군,구 구분</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ADDRESS_SI_GUN_GU<span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span><span style="color:rgb(99,163,92);">"(\uC2DC)|(\uAD70)|(\uAD6C)"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 통합 주소 검색 읍12,면12,동12,가12</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ADDRESS_UM_MYUN_DONG_GA_BUNJI <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"(\uC0B0\\d{1,5})|(\uBA74\\d{1,5})|(\uB3D9\\d{1,5})|(\uAC00\\d{1,5})|(\uB9AC\\d{1,5})"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 공백 제거 패턴</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_BLANK <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"\\p{Space}"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 한글 구분</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_HANGUL <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"[\\x{ac00}-\\x{d7af}]"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 기호중에서 - or ~ 둘중에 하나가 있는경우 구분 </span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_HYPHEN_OR_SWUNG_DASH <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span><span style="color:rgb(99,163,92);">"(~|-)"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 시,도 - 시,군,구 구분</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ADDRESS_SI_DO_SI_GUN_GU <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"("</span> <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span> PATTERN_HANGUL <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span> <span style="color:rgb(99,163,92);">"+(\uC2DC|\uB3C4)+"</span> <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span> PATTERN_HANGUL <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span> <span style="color:rgb(99,163,92);">"+(\uC2DC|\uAD70|\uAD6C))"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 도로명 주소 뒤에 붙는 글자</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * ex</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 1. 부산광역시 중구 중구로 지하31  (신창동4가)  -&gt; 지하</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ROAD_SUFFIX_TEXT <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"(\uC9C0\uD558)"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 도로명 주소 뒤에 붙는 패턴 ex) </span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 앞에 접두사 로|길</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 1.숫자</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 2.숫자+번지</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 3.숫자(~|-)번지</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 4.숫자(~|-)번지</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 한글로 시작하는경우</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 1.한글+숫자</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 2.한글+숫자+번지</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 3.한글+숫자(~|-)번지</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * &lt;br&gt; 4.한글+숫자(~|-)번지</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ROAD_SUFFIX <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"("</span> <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"("</span> <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span>        </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"(\\d{1,5})"</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"|(\\d{1,5}\uBC88\uC9C0)"</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"|(\\d{1,5}(~|-)\\d{1,5})"</span> <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"|(\\d{1,5}(~|-)\\d{1,5}\uBC88\uC9C0)"</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">")"</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"|"</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"("</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span>    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"("</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span>PATTERN_ROAD_SUFFIX_TEXT<span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span><span style="color:rgb(99,163,92);">"\\d{1,5})"</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"|("</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span>PATTERN_ROAD_SUFFIX_TEXT<span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span><span style="color:rgb(99,163,92);">"\\d{1,5}\uBC88\uC9C0)"</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"|("</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span>PATTERN_ROAD_SUFFIX_TEXT<span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span><span style="color:rgb(99,163,92);">"\\d{1,5}(~|-)\\d{1,5})"</span> <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">"|("</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span>PATTERN_ROAD_SUFFIX_TEXT<span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span><span style="color:rgb(99,163,92);">"\\d{1,5}(~|-)\\d{1,5}\uBC88\uC9C0)"</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">")"</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">+</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(99,163,92);">")"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 도로명 주소 패턴 ex) (한글|(숫자(~|-)숫자)|숫자)로|길            </span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ROAD <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"(([\\x{ac00}-\\x{d7af}]|(\\d{1,5}(~|-)\\d{1,5})|\\d{1,5})+(\uB85C|\uAE38))"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 한글 + 읍,면,동,가,리</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ADDRESS_UM_MYUN_DONG_GA_RI <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"([\\x{ac00}-\\x{d7af}]+((\uC74D)|(\uBA74)|(\uB3D9)|(\uAC00)|(\uB9AC)))"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 한글 + 읍,면,동,가</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ADDRESS_UM_MYUN_DONG_GA <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"([\\x{ac00}-\\x{d7af}]+((\uC74D)|(\uBA74)|(\uB3D9)|(\uAC00)))"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 한글 + 리</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ADDRESS_RI <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"([\\x{ac00}-\\x{d7af}]+(\uB9AC))"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 번지 112-11, 11</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ADDRESS_BUNJI <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span><span style="color:rgb(99,163,92);">"(\\d{1,5}(~|-)\\d{1,5}|\\d{1,5})"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 산번지 112-112</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_ADDRESS_SAN_BUNJI <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span><span style="color:rgb(99,163,92);">"(\uC0B0(\\d{1,5}(~|-)\\d{1,5}|\\d{1,5}))"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 회사이름 앞,뒤 글자</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_COMPANY_PREFIX_AND_SUFFIX <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"(\\(\uC8FC)\\)|(\\(\uC0AC)\\)|(\\(\uC7AC)\\)"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 특수문자</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> PATTERN_SPECIAL_LETTERS <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(99,163,92);">"\\p{Punct}"</span>;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 시,도 &amp; 시,군,구 &amp; 도로명 주소 분류 패턴</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * @return</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(6,109,226);">String</span> toSidoSigunguRoad() {</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        StringBuffer buffer <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(167,29,93);">new</span> StringBuffer();</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(167,29,93);">new</span> StringBuffer();</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ADDRESS_SI_DO_SI_GUN_GU);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ROAD);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ROAD_SUFFIX);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        <span style="color:rgb(167,29,93);">return</span> buffer.<span style="color:rgb(6,109,226);">toString</span>();</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    }</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 시,군,구 &amp; 도로명 주소 분류 패턴</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * @return</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(6,109,226);">String</span> toSigunguRoad() {</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        StringBuffer buffer <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(167,29,93);">new</span> StringBuffer();</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ADDRESS_SI_GUN_GU);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ROAD);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ROAD_SUFFIX);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        <span style="color:rgb(167,29,93);">return</span> buffer.<span style="color:rgb(6,109,226);">toString</span>();</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    }</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 도로명 주소 분류 패턴</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * @return</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(6,109,226);">String</span> toRoad(){</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        StringBuffer buffer <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(167,29,93);">new</span> StringBuffer();</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ROAD);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ROAD_SUFFIX);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        <span style="color:rgb(167,29,93);">return</span> buffer.<span style="color:rgb(6,109,226);">toString</span>();</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    }</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(153,153,153);">/**</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * 통합 주소 검색 패턴</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     * @return</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(153,153,153);">     */</span></div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">final</span> <span style="color:rgb(6,109,226);">String</span> toUnifiedAddress(){</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        StringBuffer buffer <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> <span style="color:rgb(167,29,93);">new</span> StringBuffer();</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(<span style="color:rgb(99,163,92);">"("</span>);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ADDRESS_UM_MYUN_DONG_GA_RI);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ADDRESS_BUNJI);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(<span style="color:rgb(99,163,92);">")"</span>);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(<span style="color:rgb(99,163,92);">"|"</span>);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(<span style="color:rgb(99,163,92);">"("</span>);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ADDRESS_UM_MYUN_DONG_GA_RI);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(PATTERN_ADDRESS_SAN_BUNJI);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        buffer.append(<span style="color:rgb(99,163,92);">")"</span>);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        <span style="color:rgb(167,29,93);">return</span> buffer.<span style="color:rgb(6,109,226);">toString</span>();</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    }</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">}</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">출처: https:<span style="color:rgb(153,153,153);">//devlsh.tistory.com/entry/정규식-패턴-설명-및-예제 [잘해보자구!:티스토리]</span></div><div><span style="color:rgb(153,153,153);"><br /></span></div></div><div></div>
<div class="content_move">[이 게시물은 하나를하더라도최선을님에 의해 2022-07-20 13:09:51 vb.net에서 이동 됨]</div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2022-07-20T13:09:38+09:00</dc:date>
</item>


<item>
<title>[Java] File Dialog, File Open, File Read, File Save</title>
<link>http://blog.program1472.com/bbs/board.php?bo_table=TB_12&amp;amp;wr_id=3</link>
<description><![CDATA[<div class="article">


<div><div class="rc"><div class="r"><a href="https://rainflys.tistory.com/101" rel="nofollow"></a><h3 class="LC20lb"><a href="https://rainflys.tistory.com/101" rel="nofollow"><span class="S3Uucc">출처 :: [Java] File Dialog, File Open, File Read, File Save ... - 悲像之我</span></a></h3><a href="https://rainflys.tistory.com/101" rel="nofollow"><br /></a><div class="TbwUpd"><a href="https://rainflys.tistory.com/101" rel="nofollow"><cite class="iUh30 bc">https://rainflys.tistory.com › ...</cite></a></div><a href="https://rainflys.tistory.com/101" rel="nofollow"></a><span></span><div class="action-menu ab_ctl"><a class="GHDvEf ab_button" href="#"><span class="mn-dwn-arw"></span></a><div class="action-menu-panel ab_dropdown"><ol><li class="action-menu-item ab_dropdownitem"><a class="fl" href="https://webcache.googleusercontent.com/search?q=cache:U_OGzq7j_kgJ:https://rainflys.tistory.com/101+&amp;cd=2&amp;hl=ko&amp;ct=clnk&amp;gl=kr" rel="nofollow">저장된 페이지</a></li></ol></div></div></div><div class="s"><div><span class="st"><span class="f">2011. 10. 20. - </span><em>Java</em>에서 <em>File Dialog</em>, <em>File</em> Open, <em>File Read, File</em> Save, <em>File</em> Excute를 ... <em>getFile</em>(); if(m_Debug == true) System.out.println(DirName + <em>FileName</em>);</span></div></div></div></div>





						<p><span style="font-size:10pt;"><font color="#000000">Java에서 <br />


File Dialog, File Open, File Read, File Save, File Excute를 하기 위한 Import는 아래와 같다.</font></span></p>


<p><font color="#000000"><span style="font-size:10pt;">import java.awt.FileDialog;</span><br /><span style="font-size:10pt;">import java.awt.Frame;<br /></span></font></p><font color="#000000"><span style="font-size:10pt;"><strong>1. Dialog창을 띄워서, File Open하여 File Read하는 부분의 쏘스이다. <br /></strong><br /></span>


</font><div style="border-bottom:#79a5e4 3px double;border-left:#79a5e4 3px double;padding-bottom:10px;background-color:#dbe8fb;padding-left:10px;padding-right:10px;border-top:#79a5e4 3px double;border-right:#79a5e4 3px double;padding-top:10px;" class="txc-textbox"><font color="#000000"><span style="font-size:10pt;">   <span style="font-size:9pt;">Frame f = new Frame();</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   FileDialog dial = new FileDialog(f, "Open", FileDialog.LOAD);</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">      </span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   dial.setFile("*.*");</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   dial.setVisible(true);   </span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   String DirName = dial.getDirectory();</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   String FileName = dial.getFile();   </span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   if(m_Debug == true) System.out.println(DirName + FileName);</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   </span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   String strName = DirName + FileName;</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   </span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   // File Load</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   byte[] abData = FileUtil.read(strName);</span></span></font><br /></div>


<p><font color="#000000"><span style="font-size:10pt;"><span style="font-size:9pt;">  </span></span><br /><span style="font-size:10pt;"><strong>2.1. byte[]형식의 데이타를, String의 Path에 저장하는 함수이다.</strong></span></font><font color="#000000"><span style="font-size:10pt;"><strong> </strong></span></font></p><font color="#000000">


</font><div style="border-bottom:#9fd331 3px double;border-left:#9fd331 3px double;padding-bottom:10px;background-color:#e7fdb5;padding-left:10px;padding-right:10px;border-top:#9fd331 3px double;border-right:#9fd331 3px double;padding-top:10px;" class="txc-textbox"><span style="font-size:9pt;">public static boolean save(final String str, final byte[] by)</span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">  {</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   try</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   {</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">    final FileOutputStream fos = new FileOutputStream(str);</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">    fos.write(by);</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">    fos.close();</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">    return true;</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   }</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   catch (Exception e)</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   {</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">    return false;</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   }</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">  }</span></span><span style="font-size:10pt;"><span style="font-size:9pt;">   </span></span></div>


<p><font color="#000000"></font><span style="font-size:10pt;"><font color="#000000"><strong><br />


2.2 위 함수를 이용하여, 파일로 Save하고 Excute하는 부분의 쏘스이다.</strong></font></span></p><font color="#000000">


</font><div style="border-bottom:#f3c534 3px double;border-left:#f3c534 3px double;padding-bottom:10px;background-color:#fefeb8;padding-left:10px;padding-right:10px;border-top:#f3c534 3px double;border-right:#f3c534 3px double;padding-top:10px;" class="txc-textbox"><span style="font-size:9pt;">  byte[] abCert = signVerify.ParseSignedData(abPureSignData);</span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   </span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   //File Save</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   UFilePlus.save("D:/test.der", abCert);</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   </span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   //Run</span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   String cmd[] = {"cmd", "/c", "start", "D:/test.der"};   </span></span><br /><span style="font-size:10pt;"><span style="font-size:9pt;">   Runtime.getRuntime().exec(cmd);</span></span><br /><br /></div>

















						


					</div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2019-12-06T12:23:29+09:00</dc:date>
</item>


<item>
<title>[JAVA] java case is between</title>
<link>http://blog.program1472.com/bbs/board.php?bo_table=TB_12&amp;amp;wr_id=2</link>
<description><![CDATA[<div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(167,29,93);">void</span> main(<span style="color:rgb(6,109,226);">String</span>[] args) {       </div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        <span style="color:rgb(6,109,226);">int</span> num<span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span>(<span style="color:rgb(6,109,226);">int</span>)(Math.random() <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">*</span> <span style="color:rgb(0,153,204);">11</span>);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        <span style="color:rgb(167,29,93);">if</span> (isBetween(num, <span style="color:rgb(0,153,204);">1</span>, <span style="color:rgb(0,153,204);">5</span>)) {</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(6,109,226);">System</span>.<span style="color:rgb(6,109,226);">out</span>.<span style="color:rgb(6,109,226);">println</span>(<span style="color:rgb(99,163,92);">"testing case 1 to 5"</span>);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        } <span style="color:rgb(167,29,93);">else</span> <span style="color:rgb(167,29,93);">if</span> (isBetween(num, <span style="color:rgb(0,153,204);">6</span>, <span style="color:rgb(0,153,204);">10</span>)) {</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">            <span style="color:rgb(6,109,226);">System</span>.<span style="color:rgb(6,109,226);">out</span>.<span style="color:rgb(6,109,226);">println</span>(<span style="color:rgb(99,163,92);">"testing case 6 to 10"</span>);</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">        }</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    }</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    <span style="color:rgb(167,29,93);">public</span> <span style="color:rgb(167,29,93);">static</span> <span style="color:rgb(6,109,226);">boolean</span> isBetween(<span style="color:rgb(6,109,226);">int</span> x, <span style="color:rgb(6,109,226);">int</span> lower, <span style="color:rgb(6,109,226);">int</span> upper) {</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">          <span style="color:rgb(167,29,93);">return</span> lower <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">&lt;</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> x <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">&amp;</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">&amp;</span> x <span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">&lt;</span><span style="color:rgb(0,134,179);"></span><span style="color:rgb(167,29,93);">=</span> upper;</div><div style="padding:0px 6px;white-space:pre;line-height:15.6px;">    }</div><div class="colorscripter-code" style="color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;"></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2019-10-25T12:22:39+09:00</dc:date>
</item>


<item>
<title>[JAVA] [펌] 변수(Variable), 변수의 종류, 크기  출처: https://blog.opid.kr/64 [opid's document]</title>
<link>http://blog.program1472.com/bbs/board.php?bo_table=TB_12&amp;amp;wr_id=1</link>
<description><![CDATA[<div class="exlink">


                      <div class="tt_article_useless_p_margin"><p><span style="font-size:9pt;"><strong>변수란</strong></span></p>


<p style="margin-left:2em;">하나의 값을 저장할 수 있는 공간.</p>


<p> </p>


<p><strong>변수의 선언</strong></p>


<p style="margin-left:2em;">변수타입 변수이름;</p>


<p style="margin-left:2em;">char name;    // 문자형 변수 name을 선언한다.</p>


<p style="margin-left:2em;">변수의 이름(메서드, 클래스의 이름도 포함)을 선언할때, 대소문자 구분해야한다.</p>


<p style="margin-left:2em;">숫자로 시작하거나, 예약어를 사용하면 안 된다.</p>


<p style="margin-left:2em;">특수문자는 '_'와 '$'만 사용가능하다.</p>


<p style="margin-left:2em;">int num = 6 ;    // 선언후 변수의 값을 6으로 초기화 한다. </p>


<p> </p>


<p><strong>변수의 타입과 크기</strong></p>


<p style="margin-left:2em;">기본형(Primitive type) : boolean, char, byte, short, int, long, float, double</p>


<p>


</p><p style="margin-left:2em;">참조형(Reference type) : 기본형을 제외한 나머지 타입 </p>


<p style="margin-left:2em;"> </p>


<p style="margin-left:2em;">


</p><table style="border-bottom:medium none;border-left:medium none;width:574px;border-collapse:collapse;font-family:'돋움';font-size:9pt;border-top:medium none;border-right:medium none;" class="txc-table" border="0" cellspacing="0" cellpadding="0" width="574"><tbody><tr><td style="border-bottom:#fff 1px solid;border-left:#fff 1px solid;background-color:#000;width:114px;height:24px;color:#fff;border-top:#fff 1px solid;border-right:#fff 1px solid;">


<p style="text-align:center;"> </p></td>


<td style="border-bottom:#fff 1px solid;background-color:#000;width:114px;height:24px;color:#fff;border-top:#fff 1px solid;border-right:#fff 1px solid;">


<p style="text-align:center;">1 byte</p></td>


<td style="border-bottom:#fff 1px solid;background-color:#000;width:114px;height:24px;color:#fff;border-top:#fff 1px solid;border-right:#fff 1px solid;">


<p style="text-align:center;">2 byte</p></td>


<td style="border-bottom:#fff 1px solid;background-color:#000;width:114px;height:24px;color:#fff;border-top:#fff 1px solid;border-right:#fff 1px solid;">


<p style="text-align:center;">4 byte</p></td>


<td style="border-bottom:#fff 1px solid;background-color:#000;width:115px;height:24px;color:#fff;border-top:#fff 1px solid;border-right:#000 1px solid;">


<p style="text-align:center;">8 byte</p></td></tr><tr><td style="border-bottom:#fff 1px solid;border-left:#fff 1px solid;background-color:#000;width:114px;height:24px;color:#fff;border-right:#fff 1px solid;">


<p style="text-align:center;">논리형</p></td>


<td style="border-bottom:medium none;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;">boolean</p></td>


<td style="border-bottom:medium none;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;"></p></td>


<td style="border-bottom:medium none;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;"></p></td>


<td style="border-bottom:medium none;background-color:transparent;width:115px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;"></p></td></tr><tr><td style="border-bottom:#fff 1px solid;border-left:#fff 1px solid;background-color:#000;width:114px;height:24px;color:#fff;border-right:#fff 1px solid;">


<p style="text-align:center;">문자형</p></td>


<td style="border-bottom:medium none;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;"></p></td>


<td style="border-bottom:medium none;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;">char</p>


<p style="text-align:center;"><span style="font-size:8pt;">(유니코드)</span></p></td>


<td style="border-bottom:medium none;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;"></p></td>


<td style="border-bottom:medium none;background-color:transparent;width:115px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;"></p></td></tr><tr><td style="border-bottom:#fff 1px solid;border-left:#fff 1px solid;background-color:#000;width:114px;height:24px;color:#fff;border-right:#fff 1px solid;">


<p style="text-align:center;">정수형</p></td>


<td style="border-bottom:medium none;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;">byte</p></td>


<td style="border-bottom:medium none;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;">short</p></td>


<td style="border-bottom:medium none;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;"><strong>int</strong></p>


<p style="text-align:center;"><strong><span style="font-size:8pt;">(기본 자료형)</span></strong></p></td>


<td style="border-bottom:medium none;background-color:transparent;width:115px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;">long</p></td></tr><tr><td style="border-bottom:#fff 1px solid;border-left:#fff 1px solid;background-color:#000;width:114px;height:24px;color:#fff;border-right:#fff 1px solid;">


<p style="text-align:center;">실수형</p></td>


<td style="border-bottom:#000 1px solid;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;"></p></td>


<td style="border-bottom:#000 1px solid;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;"></p></td>


<td style="border-bottom:#000 1px solid;background-color:transparent;width:114px;height:24px;color:#000;border-right:medium none;">


<p style="text-align:center;">float</p></td>


<td style="border-bottom:#000 1px solid;background-color:transparent;width:115px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;"><strong>double</strong></p>


<p style="text-align:center;"><strong><span style="font-size:8pt;">(기본 자료형)</span></strong></p></td></tr></tbody></table><p></p>


<p style="margin-left:2em;"> </p>


<p></p>


<p>


</p><p style="margin-left:2em;">


</p><table style="border-bottom:medium none;border-left:medium none;border-collapse:collapse;font-family:'돋움';font-size:9pt;border-top:medium none;border-right:medium none;" class="txc-table" border="0" cellspacing="0" cellpadding="0" width="574"><tbody><tr><td style="border-bottom:#d9d9d9 1px solid;border-left:#000 1px solid;background-color:#000;width:93px;height:24px;color:#fff;border-top:#000 1px solid;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">데이터 타입</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:#000;width:339px;height:24px;color:#fff;border-top:#000 1px solid;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">변수의 범위 </p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:#000;width:90px;height:24px;color:#fff;border-top:#000 1px solid;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;"> 기본값</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:#000;width:79px;height:24px;color:#fff;border-top:#000 1px solid;border-right:#000 1px solid;">


<p style="text-align:center;">크기 </p></td></tr><tr><td style="border-bottom:#d9d9d9 1px solid;border-left:#000 1px solid;background-color:transparent;width:93px;height:22px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">boolean</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:339px;height:22px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">true, false</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:90px;height:22px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;"> false</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:79px;height:22px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;">1 byte</p></td></tr><tr><td style="border-bottom:#d9d9d9 1px solid;border-left:#000 1px solid;background-color:transparent;width:93px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">byte</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:339px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">\u0000~\uffff (0~65,535)</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:90px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;"> 0</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:79px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;">1 byte</p></td></tr><tr><td style="border-bottom:#d9d9d9 1px solid;border-left:#000 1px solid;background-color:transparent;width:93px;height:22px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">char</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:339px;height:22px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">-128~127</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:90px;height:22px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;"> '\u000'</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:79px;height:22px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;">2 byte</p></td></tr><tr><td style="border-bottom:#d9d9d9 1px solid;border-left:#000 1px solid;background-color:transparent;width:93px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">short</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:339px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">-32,768~32,767</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:90px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;"> 0</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:79px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;">2 byte</p></td></tr><tr><td style="border-bottom:#d9d9d9 1px solid;border-left:#000 1px solid;background-color:transparent;width:93px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">int</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:339px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">-2,147,483,648~2,147,483,647</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:90px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;"> 0</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:79px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;">4 byte</p></td></tr><tr><td style="border-bottom:#d9d9d9 1px solid;border-left:#000 1px solid;background-color:transparent;width:93px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">long</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:339px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">-9223372036854775808~9223372036854775807</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:90px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;"> 0L</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:79px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;">8 byte</p></td></tr><tr><td style="border-bottom:#d9d9d9 1px solid;border-left:#000 1px solid;background-color:transparent;width:93px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">float</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:339px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">1.4E-45~3.4028235E38</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:90px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;"> 0.0f</p></td>


<td style="border-bottom:#d9d9d9 1px solid;background-color:transparent;width:79px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;">4 byte</p></td></tr><tr><td style="border-bottom:#000 1px solid;border-left:#000 1px solid;background-color:transparent;width:93px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">double</p></td>


<td style="border-bottom:#000 1px solid;background-color:transparent;width:339px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;">4.9E-324~1.7976931348623157E308</p></td>


<td style="border-bottom:#000 1px solid;background-color:transparent;width:90px;height:24px;color:#000;border-right:#d9d9d9 1px solid;">


<p style="text-align:center;"> 0.0 또는 0.0d</p></td>


<td style="border-bottom:#000 1px solid;background-color:transparent;width:79px;height:24px;color:#000;border-right:#000 1px solid;">


<p style="text-align:center;">8 byte</p></td></tr></tbody></table><p></p>


<p style="margin-left:2em;"> </p>


<p style="margin-left:2em;"> </p>


<p></p>


<p> </p><div class="container_postbtn #post_button_group">


    <div class="postbtn_like">


        <div class="wrap_btn">


    


        <div class="uoc-icon">


            <span class="ico_postbtn ico_like">좋아요</span>


            <span class="txt_like uoc-text screen_out">공감</span>


            <span class="txt_like uoc-count">6</span>


        </div>


    


</div>


        <div class="wrap_btn wrap_btn_share">


    


        <span class="ico_postbtn ico_share">공유하기</span>


    


</div>


                <div class="wrap_btn wrap_btn_etc">


    <span class="ico_postbtn ico_etc">글 요소</span>


</div>


    </div>


    


    <em class="txt_state">구독하기</em>


    <strong class="txt_tool_id">opid's document</strong>


    <span class="img_common_tistory ico_check_type1"></span>





    <div class="postbtn_ccl">


    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.ko" target="_blank" class="link_ccl" rel="nofollow noreferrer noopener">


        <span class="bundle_ccl">


            <span class="ico_postbtn ico_ccl1">저작자표시</span><span class="ico_postbtn ico_ccl2">비영리</span><span class="ico_postbtn ico_ccl4">동일조건</span>        </span>


    </a>


</div>


    


</div><div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-center tt-sns-icon-size-big">


	<div class="tt-sns-wrap">


		<ul class="tt-sns-service-default"><li class="tt-sns-service-kakaostory"><a>카카오스토리</a></li>


			<li class="tt-sns-service-twitter"><a>트위터</a></li>


			<li class="tt-sns-service-facebook"><a>페이스북</a></li>


		</ul></div>


	<div class="tt-sns-clear"></div>


</div>


<div style="text-align:center;padding-top:10px;clear:both;">


<iframe src="//www.facebook.com/plugins/like.php?href=https://blog.opid.kr/64&amp;layout=standard&amp;show_faces=true&amp;width=310&amp;action=like&amp;font=tahoma&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none;width:310px;height:65px;"></iframe>


</div>


<div class="another_category another_category_color_gray">


<h4>'<a href="/category/%EB%8C%80%ED%95%99%20%EC%83%9D%ED%99%9C">대학 생활</a> &gt; <a href="/category/%EB%8C%80%ED%95%99%20%EC%83%9D%ED%99%9C/JAVA">JAVA</a>' 카테고리의 다른 글</h4>


<table><tbody><tr><th>


<a href="/71?category=488533">[JAVA]클래스메서드(static메서드)와 인스턴스매서드 예제</a>  <span>(0)</span>


</th>


<td>


2013.05.03</td>


</tr><tr><th>


<a href="/66?category=488533">[JAVA]if, switch, for, while (조건,반복문)</a>  <span>(0)</span>


</th>


<td>


2013.04.05</td>


</tr><tr><th>


<a href="/64?category=488533" class="current">[JAVA] 변수(Variable), 변수의 종류, 크기</a>  <span>(0)</span>


</th>


<td>


2013.03.15</td>


</tr><tr><th>


<a href="/63?category=488533">[JAVA]JAVA API 한글</a>  <span>(0)</span>


</th>


<td>


2013.03.15</td>


</tr><tr><th>


<a href="/62?category=488533">[JAVA] Java 환경변수(path) 설정하기</a>  <span>(2)</span>


</th>


<td>


2013.03.13</td>


</tr></tbody></table></div></div>


                    </div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2019-10-24T12:02:27+09:00</dc:date>
</item>

</channel>
</rss>
