{"id":1537,"date":"2015-08-11T14:24:15","date_gmt":"2015-08-11T06:24:15","guid":{"rendered":"https:\/\/cowmanchiang.me\/wp\/?p=1537"},"modified":"2023-10-31T15:43:30","modified_gmt":"2023-10-31T07:43:30","slug":"java-check-uuid-format","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=1537","title":{"rendered":"[Java] Check UUID format"},"content":{"rendered":"<p>Ref. <a href=\"https:\/\/bukkit.org\/threads\/best-way-to-check-if-a-string-is-a-uuid.258625\/\">BUKKIT: Best way to check if a String is a UUID<\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"\">    private static boolean checkUUIDFromat(String uuid) {\n        if (uuid.matches(&quot;[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}&quot;)) {\n            return true;\n        }\n        return false;\n    }<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Ref. BUKKIT: Best way to check if a String is a UUID private static boolean checkUUIDFromat(String uuid) { if (uuid.matches(&quot;[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}&quot;)) { return true; } return false; }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[],"class_list":["post-1537","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1537"}],"version-history":[{"count":1,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1537\/revisions"}],"predecessor-version":[{"id":1904,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1537\/revisions\/1904"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}