{"id":42195,"date":"2021-09-05T20:53:08","date_gmt":"2021-09-05T20:53:08","guid":{"rendered":"https:\/\/www.oracletutoring.ca\/blog\/?p=42195"},"modified":"2021-09-05T20:53:10","modified_gmt":"2021-09-05T20:53:10","slug":"comp-sci-regular-expressions-newline-in-regex","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/comp-sci-regular-expressions-newline-in-regex\/","title":{"rendered":"Comp sci: regular expressions: newline in regex"},"content":{"rendered":"\n<h2>Self-tutoring about regex: the tutor mentions the newline in a detection pattern.<\/h2>\n<p>In PHP regex, \\n means &#8216;newline&#8217;. Therefore,<\/p>\n<p>$pat=&#8217;\/\\n\/&#8217;;<\/p>\n<p>will be found in a string containing a newline.<\/p>\n<p>Source:<\/p>\n<p><a href=\"https:\/\/www.w3schools.com\/php\/php_regex.asp\">w3schools.com<\/a><\/p>\nJack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Self-tutoring about regex: the tutor mentions the newline in a detection pattern. In PHP regex, \\n means &#8216;newline&#8217;. Therefore, $pat=&#8217;\/\\n\/&#8217;; will be found in a string containing a newline. Source: w3schools.com<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2955,3027],"tags":[],"class_list":["post-42195","post","type-post","status-publish","format-standard","hentry","category-php","category-regular-expressions"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/42195","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=42195"}],"version-history":[{"count":2,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/42195\/revisions"}],"predecessor-version":[{"id":42197,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/42195\/revisions\/42197"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=42195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=42195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=42195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}