News for hackers. Stuff that matters.
Re:Rubular - a Ruby regular expression editor by aaronblohowiak on Tuesday October 23, 2012 @03:21PM (#4689885)
ruby > 1.9
Re:Rubular - a Ruby regular expression editor by pjscott on Tuesday October 23, 2012 @09:12PM (#4691181)
Also available in Python's re module, with a syntax that's just different enough to be irritatingly incompatible.

    >>> import re
    >>> r = re.compile(r'(?P<month>\d{1,2})\/(?P<day>\d{1,2})\/(?P<year>\d{4})')
    >>> r.search("Today's date is: 10/23/2012.").groupdict()
    {'month': '10', 'day': '23', 'year': '2012'}