Ok, thank you! On Saturday, November 1, 2014 12:03:33 AM UTC-2, Nils Bruin wrote: > > On Friday, October 31, 2014 6:17:44 PM UTC-7, João Alberto Ferreira wrote: >> >> joao@Hades:~$ sage >> ┌────────────────────────────────────────────────────────────────────┐ >> │ Sage Version 6.3, Release Date: 2014-08-10 │ >> │ Type "notebook()" for the browser-based notebook interface. │ >> │ Type "help()" for help. │ >> └────────────────────────────────────────────────────────────────────┘ >> sage: import re >> sage: m = re.match(r"(\w+) (\w+)", "Isaac Newton, physicist") >> sage: m.group(0) >> IndexError: no such group >> > > That's a case of the preparser getting in the way. > > sage: m.group(int(0)) > > does work. > > the problem on the side of "group" is that its input signature is > overloaded: it can also accept group names. So it doesn't try very hard to > make an integer out of input that isn't. >
-- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.