Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In that code sample the variable "matches" seems to be magically set by the =~ assignment. That would not be very clean. Or am I missing something?


http://force7.de/nimrod/regexprs.html

You're correct. It seems to work using a template, which is a simple macro. I wonder if those are hygienic... In any case, it seems you could use the macro facility to instead have explicit bindings for match groups.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: