Ticket #15529: regex.diff

File regex.diff, 627 bytes (added by Wouter Klein Heerenbrink, 14 years ago)

Added the DOTALL operator; Python excludes newlines for the DOT operator

  • django/contrib/gis/geometry/regex.py

    diff --git a/django/contrib/gis/geometry/regex.py b/django/contrib/gis/geometry/regex.py
    index 1b9e2f4..feb6b1f 100644
    a b wkt_regex = re.compile(r'^(SRID=(?P<srid>\d+);)?'  
    99                       r'(?P<type>POINT|LINESTRING|LINEARRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)'
    1010                       r'[ACEGIMLONPSRUTYZ\d,\.\-\(\) ]+)$',
    1111                       re.I)
    12 json_regex = re.compile(r'^(\s+)?\{[\s\w,\[\]\{\}\-\."\':]+\}(\s+)?$')
     12json_regex = re.compile(r'^(\s+)?\{.*}(\s+)?$', re.DOTALL)
Back to Top