{"id":41032,"date":"2021-02-18T21:10:06","date_gmt":"2021-02-18T21:10:06","guid":{"rendered":"https:\/\/www.oracletutoring.ca\/blog\/?p=41032"},"modified":"2021-02-18T21:12:03","modified_gmt":"2021-02-18T21:12:03","slug":"computer-science-a-bit-about-regex-anchors","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/computer-science-a-bit-about-regex-anchors\/","title":{"rendered":"Computer science: a bit about regex anchors"},"content":{"rendered":"\n<h2>Self-tutoring about regular expressions: the tutor mentions a possible misstep.<\/h2>\n<p>\nIt&#8217;s true that, typically, in regex, ^ means beginning and $ means end &#8211; particularly outside of [].<\/p>\n<p>Consider the string s1: &#8220;Hello there Smedley!&#8221;<\/p>\n<p>The pattern ^there$ won&#8217;t find a match in s1, at least not in my experience. However, ^Hello will; also, ley!$ will.<\/p>\n<p>Source:<\/p>\n<p><a href=\"https:\/\/www.php.net\/manual\/en\/regexp.reference.anchors.php\">php.net<\/a><\/p>\nJack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.\n","protected":false},"excerpt":{"rendered":"<p>Self-tutoring about regular expressions: the tutor mentions a possible misstep. It&#8217;s true that, typically, in regex, ^ means beginning and $ means end &#8211; particularly outside of []. Consider the string s1: &#8220;Hello there Smedley!&#8221; The pattern ^there$ won&#8217;t find &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/computer-science-a-bit-about-regex-anchors\/\"> <span class=\"screen-reader-text\">Computer science: a bit about regex anchors<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[],"class_list":["post-41032","post","type-post","status-publish","format-standard","hentry","category-computer-science"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/41032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=41032"}],"version-history":[{"count":2,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/41032\/revisions"}],"predecessor-version":[{"id":41034,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/41032\/revisions\/41034"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=41032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=41032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=41032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}