The re2 module is an extension of the standard python re library module.It provides a way of extracting a hierarchy of named groups from a string,rather than the flat, incomplete dictionary that the standard re moduleprovides.
Be the first to post a text review of python hierarchical regular expressions. Rate and review a project by clicking thumbs up or thumbs down in the right column.
pyre2 0.2.0 - April 07, 2005 ============================ Changes since the last public release (0.1.0): New features: - Added in backward compatability for re functions (search, match, findall, finditer) - extract() now extracts hierarchies containing named groups and un-named groups. - renamed the concept of 'compression' to 'sifting'. - the named groups can be sifted out by using the new method sift() instead of extract(). - The _Match dictionary is now indexed by a group number integer or a group name string. - Allow builtin functions to be found and not require them to be passed in to the compile() function. - Passing match results to functions via the (?P<var:function>) way, now requires that the functions must be passed into the compile() function during the compilation of the regular expression. So now functions (until we think up a better name for "functions") are passed in as keyword arguments like this: from string import upper buf='0x0C drummers drumming, 0x0B pipers piping, 0x0A lords a-leaping' regex='(?P<verse>(?P<number:int_16>0x[\dA-F]+) (?P<activity:upper>[^,]+))(,)?' pat=re.compile(regex, int_16=lambda x: int(x, 16), upper=upper) Major bug fixes: - removed '_group0', '_value', etc keys in _Match dictionaries, which means there is now no limit on the named group names. Packages are available at: http://sourceforge.net/project/showfiles.php?group_id=134583 The source code subversion repository: http://pintje.servebeer.com/svn/pyre2/trunk/ Bugs can be reported here: http://sourceforge.net/tracker/?group_id=134583&atid=730385 Comments and questions can be sent to one of our forums: http://sourceforge.net/forum/?group_id=134583 Extra features can be requested here: http://sourceforge.net/tracker/?group_id=134583&atid=730388 And if you would like to join the team, or help out in any other way we'd love to have you on board! -- Chris Ottrey http://sourceforge.net/users/ottrey/
pyre2 0.2.0 - April 07, 2005 ============================ Changes since the last public release (0.1.0): New features: - Added in backward compatability for re functions (search, match, findall, finditer) - extract() now extracts hierarchies containing named groups and un-named groups. - renamed the concept of 'compression' to 'sifting'. - the named groups can be sifted out by using the new method sift() instead of extract(). - The _Match dictionary is now indexed by a group number integer or a group name string. - Allow builtin functions to be found and not require them to be passed in to the compile() function. - Passing match results to functions via the (?P<var:function>) way, now requires that the functions must be passed into the compile() function during the compilation of the regular expression. So now functions (until we think up a better name for "functions") are passed in as keyword arguments like this: from string import upper buf='0x0C drummers drumming, 0x0B pipers piping, 0x0A lords a-leaping' regex='(?P<verse>(?P<number:int_16>0x[\dA-F]+) (?P<activity:upper>[^,]+))(,)?' pat=re.compile(regex, int_16=lambda x: int(x, 16), upper=upper) Major bug fixes: - removed '_group0', '_value', etc keys in _Match dictionaries, which means there is now no limit on the named group names. Packages are available at: http://sourceforge.net/project/showfiles.php?group_id=134583 The source code subversion repository: http://pintje.servebeer.com/svn/pyre2/trunk/ Bugs can be reported here: http://sourceforge.net/tracker/?group_id=134583&atid=730385 Comments and questions can be sent to one of our forums: http://sourceforge.net/forum/?group_id=134583 Extra features can be requested here: http://sourceforge.net/tracker/?group_id=134583&atid=730388 And if you would like to join the team, or help out in any other way we'd love to have you on board! -- Chris Ottrey http://sourceforge.net/users/ottrey/
pyre2 0.2.0 - April 07, 2005 ============================ Changes since the last public release (0.1.0): New features: - Added in backward compatability for re functions (search, match, findall, finditer) - extract() now extracts hierarchies containing named groups and un-named groups. - renamed the concept of 'compression' to 'sifting'. - the named groups can be sifted out by using the new method sift() instead of extract(). - The _Match dictionary is now indexed by a group number integer or a group name string. - Allow builtin functions to be found and not require them to be passed in to the compile() function. - Passing match results to functions via the (?P<var:function>) way, now requires that the functions must be passed into the compile() function during the compilation of the regular expression. So now functions (until we think up a better name for "functions") are passed in as keyword arguments like this: from string import upper buf='0x0C drummers drumming, 0x0B pipers piping, 0x0A lords a-leaping' regex='(?P<verse>(?P<number:int_16>0x[\dA-F]+) (?P<activity:upper>[^,]+))(,)?' pat=re.compile(regex, int_16=lambda x: int(x, 16), upper=upper) Major bug fixes: - removed '_group0', '_value', etc keys in _Match dictionaries, which means there is now no limit on the named group names. Packages are available at: http://sourceforge.net/project/showfiles.php?group_id=134583 The source code subversion repository: http://pintje.servebeer.com/svn/pyre2/trunk/ Bugs can be reported here: http://sourceforge.net/tracker/?group_id=134583&atid=730385 Comments and questions can be sent to one of our forums: http://sourceforge.net/forum/?group_id=134583 Extra features can be requested here: http://sourceforge.net/tracker/?group_id=134583&atid=730388 And if you would like to join the team, or help out in any other way we'd love to have you on board! -- Chris Ottrey http://sourceforge.net/users/ottrey/
pyre2 0.2.0 - April 07, 2005 ============================ Changes since the last public release (0.1.0): New features: - Added in backward compatability for re functions (search, match, findall, finditer) - extract() now extracts hierarchies containing named groups and un-named groups. - renamed the concept of 'compression' to 'sifting'. - the named groups can be sifted out by using the new method sift() instead of extract(). - The _Match dictionary is now indexed by a group number integer or a group name string. - Allow builtin functions to be found and not require them to be passed in to the compile() function. - Passing match results to functions via the (?P<var:function>) way, now requires that the functions must be passed into the compile() function during the compilation of the regular expression. So now functions (until we think up a better name for "functions") are passed in as keyword arguments like this: from string import upper buf='0x0C drummers drumming, 0x0B pipers piping, 0x0A lords a-leaping' regex='(?P<verse>(?P<number:int_16>0x[\dA-F]+) (?P<activity:upper>[^,]+))(,)?' pat=re.compile(regex, int_16=lambda x: int(x, 16), upper=upper) Major bug fixes: - removed '_group0', '_value', etc keys in _Match dictionaries, which means there is now no limit on the named group names. Packages are available at: http://sourceforge.net/project/showfiles.php?group_id=134583 The source code subversion repository: http://pintje.servebeer.com/svn/pyre2/trunk/ Bugs can be reported here: http://sourceforge.net/tracker/?group_id=134583&atid=730385 Comments and questions can be sent to one of our forums: http://sourceforge.net/forum/?group_id=134583 Extra features can be requested here: http://sourceforge.net/tracker/?group_id=134583&atid=730388 And if you would like to join the team, or help out in any other way we'd love to have you on board! -- Chris Ottrey http://sourceforge.net/users/ottrey/
pyre2 0.2.0 - April 07, 2005 ============================ Changes since the last public release (0.1.0): New features: - Added in backward compatability for re functions (search, match, findall, finditer) - extract() now extracts hierarchies containing named groups and un-named groups. - renamed the concept of 'compression' to 'sifting'. - the named groups can be sifted out by using the new method sift() instead of extract(). - The _Match dictionary is now indexed by a group number integer or a group name string. - Allow builtin functions to be found and not require them to be passed in to the compile() function. - Passing match results to functions via the (?P<var:function>) way, now requires that the functions must be passed into the compile() function during the compilation of the regular expression. So now functions (until we think up a better name for "functions") are passed in as keyword arguments like this: from string import upper buf='0x0C drummers drumming, 0x0B pipers piping, 0x0A lords a-leaping' regex='(?P<verse>(?P<number:int_16>0x[\dA-F]+) (?P<activity:upper>[^,]+))(,)?' pat=re.compile(regex, int_16=lambda x: int(x, 16), upper=upper) Major bug fixes: - removed '_group0', '_value', etc keys in _Match dictionaries, which means there is now no limit on the named group names. Packages are available at: http://sourceforge.net/project/showfiles.php?group_id=134583 The source code subversion repository: http://pintje.servebeer.com/svn/pyre2/trunk/ Bugs can be reported here: http://sourceforge.net/tracker/?group_id=134583&atid=730385 Comments and questions can be sent to one of our forums: http://sourceforge.net/forum/?group_id=134583 Extra features can be requested here: http://sourceforge.net/tracker/?group_id=134583&atid=730388 And if you would like to join the team, or help out in any other way we'd love to have you on board! -- Chris Ottrey http://sourceforge.net/users/ottrey/
pyre2 0.2.0 - April 07, 2005 ============================ Changes since the last public release (0.1.0): New features: - Added in backward compatability for re functions (search, match, findall, finditer) - extract() now extracts hierarchies containing named groups and un-named groups. - renamed the concept of 'compression' to 'sifting'. - the named groups can be sifted out by using the new method sift() instead of extract(). - The _Match dictionary is now indexed by a group number integer or a group name string. - Allow builtin functions to be found and not require them to be passed in to the compile() function. - Passing match results to functions via the (?P<var:function>) way, now requires that the functions must be passed into the compile() function during the compilation of the regular expression. So now functions (until we think up a better name for "functions") are passed in as keyword arguments like this: from string import upper buf='0x0C drummers drumming, 0x0B pipers piping, 0x0A lords a-leaping' regex='(?P<verse>(?P<number:int_16>0x[\dA-F]+) (?P<activity:upper>[^,]+))(,)?' pat=re.compile(regex, int_16=lambda x: int(x, 16), upper=upper) Major bug fixes: - removed '_group0', '_value', etc keys in _Match dictionaries, which means there is now no limit on the named group names. Packages are available at: http://sourceforge.net/project/showfiles.php?group_id=134583 The source code subversion repository: http://pintje.servebeer.com/svn/pyre2/trunk/ Bugs can be reported here: http://sourceforge.net/tracker/?group_id=134583&atid=730385 Comments and questions can be sent to one of our forums: http://sourceforge.net/forum/?group_id=134583 Extra features can be requested here: http://sourceforge.net/tracker/?group_id=134583&atid=730388 And if you would like to join the team, or help out in any other way we'd love to have you on board! -- Chris Ottrey http://sourceforge.net/users/ottrey/
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?