1. Jason Moiron
  2. django-selector

Commits

Jason Moiron  committed a7c4466

fix number regex and chunk documentation, as per michaelgruenewald's reddit comment

  • Participants
  • Parent commits bc3352a
  • Branches default

Comments (0)

Files changed (2)

File docs/index.rst

View file
  word       ``r'\w+'``                       a single word
  alpha      ``r'[a-zA-Z]+'``                 alphabetic characters 
  digits     ``r'\d+'``                       digits
- number     ``r'\d*.?\d+'``                  float or integer numbers
- chunk      ``r'[^/^.]+'``                   a 'chunk' of text (no / or .)
+ number     ``r'\d*\.?\d+'``                 float or integer numbers
+ chunk      ``r'[^/^.]+'``                   a 'chunk' of text (no /, ^, or .)
  segment    ``r'[^/]+'``                     a url segment (between /'s)
  any        ``r'.*'``                        anything;  good for paths
  year       ``r'\d{4}'``                     a 4 digit number

File dselector.py

View file
     'word'      : r'\w+',
     'alpha'     : r'[a-zA-Z]+',
     'digits'    : r'\d+',
-    'number'    : r'\d*.?\d+',
+    'number'    : r'\d*\.?\d+',
     'chunk'     : r'[^/^.]+',
     'segment'   : r'[^/]+',
     'any'       : r'.*',