Closed GoogleCodeExporter closed 9 years ago
Should the dict behave like this?
capturesdict = {}
for name in m.groupdict().keys():
capturesdict[name] = m.captures(name)
What's your usecase? Could you provide some examples of the suggested feature?
Original comment by re...@mrabarnett.plus.com
on 23 Jan 2013 at 6:57
Yes, it should behave in this way.
Usecase: web scraping, extraction of many different values from a complex html
page in one go (for example, profile page of a product, with different
properties listed in a fixed layout) - after applying a regex the next step is
to take *all* extracted data as a dict, not one by one.
Original comment by mwojn...@gmail.com
on 23 Jan 2013 at 11:40
Could you provide some simple test cases?
I think it'll be called 'capturesdict'.
Original comment by re...@mrabarnett.plus.com
on 24 Jan 2013 at 2:01
I've added a 'capturesdict' method to match objects in regex 0.1.20130124.
Original comment by re...@mrabarnett.plus.com
on 24 Jan 2013 at 8:30
Great, thanks for all the changes and for very useful library.
Original comment by mwojn...@gmail.com
on 25 Jan 2013 at 10:59
Original issue reported on code.google.com by
mwojn...@gmail.com
on 23 Jan 2013 at 6:16