{"id":432,"date":"2018-10-04T21:15:17","date_gmt":"2018-10-05T02:15:17","guid":{"rendered":"http:\/\/zewwy.ca\/?p=432"},"modified":"2018-10-04T21:15:17","modified_gmt":"2018-10-05T02:15:17","slug":"regex","status":"publish","type":"post","link":"https:\/\/zewwy.ca\/index.php\/2018\/10\/04\/regex\/","title":{"rendered":"RegEx"},"content":{"rendered":"<p>It&#8217;s power and complex.<\/p>\n<p>I was gonna write a blog post, but I got sucked into learning regex for hours&#8230; and I&#8217;m still baffled at the syntax&#8230;<\/p>\n<p>One thing is for sure&#8230;. backlooks are difficult without context awareness (variables)&#8230;..<\/p>\n<p>Ugh, <a href=\"https:\/\/stackoverflow.com\/questions\/3641470\/how-do-i-match-the-line-before-and-after-a-pattern-match-in-perl\">Example 1<\/a> <a href=\"https:\/\/superuser.com\/questions\/900411\/how-to-capture-a-couple-of-lines-around-a-regex-match\">Example 2<\/a><\/p>\n<p>Then there&#8217;s learning about <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/standard\/base-types\/anchors-in-regular-expressions\">Anchors<\/a> or &#8220;automatic zero-width assertions&#8221; &#8230; ooooeeeeeee that&#8217;s a mouthful.<\/p>\n<p>Ugh man&#8230;  I&#8217;ll eventually get the results I want, just a matter of time&#8230;<\/p>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/406230\/regular-expression-to-match-a-line-that-doesnt-contain-a-word\">Interesting how to get everything but a set string<\/a>.<\/p>\n<p>Don&#8217;t forget it&#8217;s sometimes OK to be <a href=\"https:\/\/stackoverflow.com\/questions\/14213848\/difference-between-and\">Greedy and Lazy<\/a>.<\/p>\n<p>It amazes me how much time I&#8217;ve spent reading up on regex&#8230; I knew it was powerful&#8230; but man&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s power and complex. I was gonna write a blog post, but I got sucked into learning regex for hours&#8230; and I&#8217;m still baffled at the syntax&#8230; One thing is for sure&#8230;. backlooks are difficult without context awareness (variables)&#8230;.. Ugh, Example 1 Example 2 Then there&#8217;s learning about Anchors or &#8220;automatic zero-width assertions&#8221; &#8230; ooooeeeeeee &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/zewwy.ca\/index.php\/2018\/10\/04\/regex\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;RegEx&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","footnotes":""},"categories":[11],"tags":[107],"class_list":["post-432","post","type-post","status-publish","format-standard","hentry","category-scripting","tag-regex"],"_links":{"self":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/comments?post=432"}],"version-history":[{"count":1,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/432\/revisions"}],"predecessor-version":[{"id":433,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/432\/revisions\/433"}],"wp:attachment":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/media?parent=432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/categories?post=432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/tags?post=432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}