{"id":2482,"date":"2010-03-25T19:06:00","date_gmt":"2010-03-25T19:06:00","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/Hayek\/Jochen\/wp\/blog-en\/2010\/03\/25\/perls-pattern-matching-enhanced-by-named-capture-buffers\/"},"modified":"2010-03-25T19:06:00","modified_gmt":"2010-03-25T19:06:00","slug":"perls-pattern-matching-enhanced-by-named-capture-buffers","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2010\/03\/25\/perls-pattern-matching-enhanced-by-named-capture-buffers\/","title":{"rendered":"perl&#8217;s pattern matching enhanced by &#8220;named capture buffers&#8221;"},"content":{"rendered":"<p>\t\t\t\tpython has long had it: <i>symbolic groups<\/i>. They allow you to refer to a substring matched by a <i>symbolic group name<\/i>: &#8220;(?P&lt;<i>id<\/i>&gt;)&#8221;, <i>id<\/i> in this case. Now perl has drawn equal: &#8220;(?&lt;<i>id<\/i>&gt;)&#8221; does the same job, and the feature is called <i>named capture buffers<\/i>. Read it up in the <i>perlre<\/i> manual page or online <a href=\"http:\/\/perldoc.perl.org\/perlre.html\">here<\/a>! Basically the pieces go to &#8220;%+&#8221;, i.e. a hash array by the name of &#8220;+&#8221;.\u00a0\t\t\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>python has long had it: symbolic groups. They allow you to refer to a substring matched by a symbolic group name: &#8220;(?P&lt;id&gt;)&#8221;, id in this case. Now perl has drawn equal: &#8220;(?&lt;id&gt;)&#8221; does the same job, and the feature is called named capture buffers. Read it up in the perlre manual page or online here! [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[666],"tags":[],"class_list":["post-2482","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-E2","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/2482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=2482"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/2482\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=2482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=2482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=2482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}