'ruby' Tag

  • Ruby and named regex matched groups.

    February 17, 2010

    Back from China, I’ve resume my normal programming schedule. I’m working through Pragmatic Bookshelf’s Programming Ruby, and there’s a lot more to ruby than I initially gave credit. For example, consider the following: str = ‘an’ * 3000 + ‘garbage’ + ‘an’*3000 r = /(?<pattern>.*) #The first part (?:.*?) #Garbage \k<pattern>/x #The first part, repeated. [...]

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org