{"id":344,"date":"2023-08-09T09:14:35","date_gmt":"2023-08-09T15:14:35","guid":{"rendered":"https:\/\/kop.lat\/blog\/?p=344"},"modified":"2023-08-09T09:14:43","modified_gmt":"2023-08-09T15:14:43","slug":"regex-basic-example-explained","status":"publish","type":"post","link":"https:\/\/kop.lat\/blog\/regex-basic-example-explained\/","title":{"rendered":"regex basic example explained"},"content":{"rendered":"\n<p>Let&#8217;s say, need a character string like this &#8220;<code>64d3ab4de4bae1091e5de441<\/code>&#8221; wiht only digitnumbers, lowercase and Upper case letters from a to f, and A to F respectively and 24 characters. <\/p>\n\n\n\n<p>Regex offers a way to match this type of strings.<\/p>\n\n\n\n<p>In this case, the regex expression would be as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/^&#91;0-9a-fA-F]{24}$\/<\/code><\/pre>\n\n\n\n<p><code>\/^<\/code> this is the start<\/p>\n\n\n\n<p><code>$\/<\/code> this is the end<\/p>\n\n\n\n<p><code>[0-9a-fA-F]<\/code> this indicates that it should be digitnumbers from 0 to 9, and string characters from a to f, and A to F, respectively.<\/p>\n\n\n\n<p><code>{24}<\/code> this, in curly brackets, the number of characters<\/p>\n\n\n\n<p>that is all<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s say, need a character string like this &#8220;64d3ab4de4bae1091e5de441&#8221; wiht only digitnumbers, lowercase and Upper case letters from a to f, and A to F respectively and 24 characters. Regex offers a way to match this type of strings. In this case, the regex expression would be as follows: \/^ this is the start $\/ [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":245,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[39,41,1,32,35,48,6],"tags":[],"_links":{"self":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts\/344"}],"collection":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/comments?post=344"}],"version-history":[{"count":3,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts\/344\/revisions"}],"predecessor-version":[{"id":347,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts\/344\/revisions\/347"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/media\/245"}],"wp:attachment":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/media?parent=344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/categories?post=344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/tags?post=344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}