#13646: Wrong RE in comma_separated_int_list_re ---------------------------------------------------+------------------------ Reporter: aledr | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: 1.2 Resolution: | Keywords: CommaSeparatedIntegerField Stage: Design decision needed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Comment (by JohnDoe):
Replying to [comment:6 aledr]: > Replying to [comment:5 aledr]: > > Just figured out that the correct should be: > > > > {{{ > > re.compile('!^(\d,)*\d$') > > }}} > > > > Is it possible to change in ticket description? > > > > Thanks. > > > Wrong again, sorry... It's not possible to use '!^' in this RE, It will always fail. > > After tests done, correct is: > {{{ > re.compile('(\d,)*\d$') > }}} > > It will '''only''' allow '''integers''', not nulls or commas or anything else comma separated. What you're doing here doesn't make much sense. IF this is how it should be designed, the answer is {{{ re.compile('^(\d+,)*\d+$') }}} Still, there's no final design decision. -- Ticket URL: <http://code.djangoproject.com/ticket/13646#comment:7> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.