{"id":2189,"date":"2013-03-22T12:52:24","date_gmt":"2013-03-22T03:52:24","guid":{"rendered":"http:\/\/auctionpro.co.kr\/?p=2189"},"modified":"2020-09-10T11:25:55","modified_gmt":"2020-09-10T02:25:55","slug":"c-%ec%88%ab%ec%9e%90%eb%a7%8c-%ec%b6%94%ec%b6%9c-%ed%95%a8%ec%88%98","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=2189","title":{"rendered":"c# \uc22b\uc790 \/ \ubb38\uc790  \ucd94\ucd9c Regex"},"content":{"rendered":"<p><H4> \ub300\ubb38\uc790 2\uae00\uc790 \ucd94\ucd9c <\/H4><\/p>\n<pre class=\"lang:c# decode:true \" >using System;\r\nusing System.Text.RegularExpressions;\r\n\r\nclass Program\r\n{\r\n    static void Main()\r\n    {\r\n        \/\/ Part 1: the input string.\r\n        string input = \"abcABC1234567\u314f\u3163\";\r\n\r\n        \/\/ Part 2: call Regex.Match.\r\n        Match match = Regex.Match(input, @\"[A-Z]{2}\",\r\n            RegexOptions.IgnoreCase);\r\n\r\n        \/\/ Part 3: check the Match for Success.\r\n        if (match.Success)\r\n        {\r\n            \/\/ Part 4: get the Group value and display it.\r\n            string key = match.Groups[0].Value;\r\n            Console.WriteLine(key);\r\n        }\r\n    }\r\n}\r\n\r\n\/\/AB<\/pre>\n<p><H4>  \ub2e4\uc74c\uc740 \uc22b\uc790\ub9cc \ucd94\ucd9c\ud560\ub54c \uc4f0\uba74 \ub41c\ub2e4. <\/H4><br \/>\n\ubc18\ub4dc\uc2dc \uc22b\uc790\uac00 \ud558\ub098\uc774\uc0c1 \uc788\uc5b4\uc57c \ub428.<\/p>\n<pre class=\"lang:c# decode:true \" >using System.Text.RegularExpressions;&lt;\/code&gt;\r\n\r\nstring strText = \"abc1234567\u314f\u3163\"\r\nstring strNum = \"\";\r\nstrNum = Regex.Replace(strText, @\"\\D\", \"\");<\/pre>\n<p>=&gt; 1234567<br \/>\n\ub2f7\ub137 \uc815\uaddc\uc2dd\uc5d0\uc11c \\d\ub294 \uc22b\uc790. \\D\ub294 \uc22b\uc790\uac00 \uc544\ub2cc \ubb38\uc790\ub97c \uc758\ubbf8<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:vim decode:true \">abc\u2026\tLetters\r\n123\u2026\tDigits\r\n\\d\tAny Digit\r\n\\D\tAny Non-digit character\r\n.\tAny Character\r\n\\.\tPeriod\r\n[abc]\tOnly a, b, or c\r\n[^abc]\tNot a, b, nor c\r\n[a-z]\tCharacters a to z\r\n[0-9]\tNumbers 0 to 9\r\n\\w\tAny Alphanumeric character\r\n\\W\tAny Non-alphanumeric character\r\n{m}\tm Repetitions\r\n{m,n}\tm to n Repetitions\r\n*\tZero or more repetitions\r\n+\tOne or more repetitions\r\n?\tOptional character\r\n\\s\tAny Whitespace\r\n\\S\tAny Non-whitespace character\r\n^\u2026$\tStarts and ends\r\n(\u2026)\tCapture Group\r\n(a(bc))\tCapture Sub-group\r\n(.*)\tCapture all\r\n(abc|def)\tMatches abc or def<\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>\ub300\ubb38\uc790 2\uae00\uc790 \ucd94\ucd9c using System; using System.Text.RegularExpressions; class Program { static void Main() { \/\/ Part 1: the input string. string input = &#8220;abcABC1234567\u314f\u3163&#8221;; \/\/ <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=2189\" title=\"c# \uc22b\uc790 \/ \ubb38\uc790  \ucd94\ucd9c Regex\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-2189","post","type-post","status-publish","format-standard","hentry","category-devc"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2189"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2189\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}