{"id":1076,"date":"2017-03-28T11:58:31","date_gmt":"2017-03-28T03:58:31","guid":{"rendered":"http:\/\/39.100.100.179\/?p=1076"},"modified":"2017-07-19T19:21:27","modified_gmt":"2017-07-19T11:21:27","slug":"%e9%aa%8c%e8%af%81%e8%be%93%e5%85%a5%e9%82%ae%e7%ae%b1%e3%80%81%e6%89%8b%e6%9c%ba%e5%8f%b7","status":"publish","type":"post","link":"http:\/\/www.u3d8.com\/?p=1076","title":{"rendered":"\u9a8c\u8bc1\u8f93\u5165\u90ae\u7bb1\u3001\u624b\u673a\u53f7\u683c\u5f0f"},"content":{"rendered":"<p>\u9a8c\u8bc1\u8f93\u5165\u7684\u90ae\u7bb1\u3001\u624b\u673a\u53f7\u683c\u5f0f\u662f\u5426\u6b63\u786e<\/p>\n<pre class=\"lang:c# decode:true \">using UnityEngine;\r\nusing System.Collections;\r\nusing System.Text.RegularExpressions;\r\n\r\nnamespace Utils\r\n{\r\n    public class InputUtil\r\n    {\r\n        \r\n        static Regex emailRegex = new Regex( @\"^(?(\"\")(\"\".+?(?&lt;!\\\\)\"\"@)|(([0-9a-z]((\\.(?!\\.))|[-!#\\$%&amp;'\\*\\+\/=\\?\\^`\\{\\}\\|~\\w])*)(?&lt;=[0-9a-z])@))\" +\r\n                @\"(?(\\[)(\\[(\\d{1,3}\\.){3}\\d{1,3}\\])|(([0-9a-z][-\\w]*[0-9a-z]*\\.)+[a-z0-9][\\-a-z0-9]{0,22}[a-z0-9]))$\" );\r\n        static Regex phoneRegex = new Regex( @\"^[0-9]*$\" );\r\n\r\n        public static bool IsValidInput( string userid )\r\n        {\r\n            return userid.Length &gt; 3 &amp;&amp; userid.Length &lt; 13;\r\n        }\r\n\r\n        public static bool IsValidEmail(string email)\r\n        {\r\n            Match match = emailRegex.Match(email);\r\n            return match.Success;\r\n        }\r\n\r\n        public static bool IsValidPhoneNumber( string phoneNr )\r\n        {\r\n            Match match = phoneRegex.Match( phoneNr );\r\n            return match.Success;\r\n        }\r\n\r\n        public static bool IsValidPassword(string password)\r\n        {\r\n            return password.Length &gt; 5 &amp;&amp; password.Length &lt; 13;\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9a8c\u8bc1\u8f93\u5165\u7684\u90ae\u7bb1\u3001\u624b\u673a\u53f7\u683c\u5f0f\u662f\u5426\u6b63\u786e using UnityEngine; usi &hellip; <a href=\"http:\/\/www.u3d8.com\/?p=1076\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23],"tags":[270,271],"_links":{"self":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts\/1076"}],"collection":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1076"}],"version-history":[{"count":3,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts\/1076\/revisions"}],"predecessor-version":[{"id":1201,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts\/1076\/revisions\/1201"}],"wp:attachment":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1076"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}