photo
Jordan Sissel
geek

Sun, 16 Sep 2007

Ruby/Oniguruma code block patches

I love perl's (?{ code }) feature. I want it in other languages.

I spent some time on hacking this into ruby a few weeks ago. I finally got around to making patches.

In FreeBSD ports, I select to build Ruby 1.8.6 with oniguruma for the regex engine. After doing 'make configure' you can apply these patches:

I haven't tested this on other platforms, and it's not feature complete, but it's close.

Comments: 2 (view comments)
Tags: , , , ,
Permalink: /geekery/ruby-oniguruma-codeblock-patches
posted at: 00:38


2 responses to 'Ruby/Oniguruma code block patches'

Dong posted at Sun Sep 30 15:18:50 2007...
Can you provide a link documenting the original Perl feature that this is modeled after?  I've got a perl interpreter but I don't know how to use it well enough to decipher (?{ code }).  TY

Jordan Sissel posted at Sun Sep 30 16:36:04 2007...
perldoc perlre, look for (?{ code })
  "(?{ code })"
  WARNING: This extended regular expression feature is considered
  highly experimental, and may be changed or deleted without
  notice.
etc...


Leave a reply

You need javascript enabled to use this form. Anti-spam efforts ongoing. Also, if the comment doesn't show up, it's because the form expired. Go back and copy your comment, reload the form, and resubmit. Apologies if this is a hassle, I'm just playing with antispam methods right now. If this insists on not working, please email me about it.

Name (required)
E-mail (optional, if you want me to be able to email you back)
URL (also optional)
Comment:


Search this site

Navigation

Metadata

Home About Resume My Code (SVN)

Articles

ARP Security Dynamic DNS with DHCP OpenLDAP+Kerberos+SASL PPP over SSH SSH Security: /bin/false Week of Unix Tools Work Efficiency

Projects

fex firefox tabsearch firefox urledit grok keynav liboverride newpsm (FreeBSD) nis2ldap pam_captcha poor man's backup Solaris audio utility xboxproxy xdotool xmlpresenter xpathtool misc scripts

Presentations

Yahoo! Hack Day '06 Unix Essentials Vi/Vim Essentials

Tag Cloud

Calendar

< September 2007 >
SuMoTuWeThFrSa
       1
2 3 4 5 6 7 8
9101112131415
16171819202122
23242526272829
30      

Friends

BarCamp Kent Brewster Tantek Çelik John Resig Wesley Shields Tyler Shields

Technorati