re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?
Vinay Sajip
vinay_sajip at yahoo.co.uk
Tue Feb 14 08:20:48 EST 2012
More information about the Python-list mailing list
Tue Feb 14 08:20:48 EST 2012
- Previous message (by thread): re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?
- Next message (by thread): re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Feb 14, 4:38 am, Devin Jeanpierre <jeanpierr... at gmail.com> wrote: > Hey Pythonistas, > > Consider the regular expression "$*". Compilation fails with the > exception, "sre_constants.error: nothing to repeat". > > Consider the regular expression "(?=$)*". As far as I know it is > equivalent. It does not fail to compile. > > Why the inconsistency? What's going on here? > > -- Devin $ is a meta character for regular expressions. Use '\$*', which does compile. Regards, Vinay Sajip
- Previous message (by thread): re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?
- Next message (by thread): re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list