[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Forbid reverse ranges in rx
From: |
Mattias Engdegård |
Subject: |
Forbid reverse ranges in rx |
Date: |
Tue, 12 Mar 2019 15:02:13 +0100 |
User-agent: |
Evolution 3.30.5 (3.30.5-1.fc29) |
Given the trouble that reversed character ranges like a-Z cause in
standard regexps, there is no reason they should be allowed in rx.
Right now, (rx (any "0-9z-a")) becomes "[0-9]" and (rx (any (?9 . ?0)))
becomes "[9-0]". Such expressions are always a mistake; we do users a
disservice by allowing them.
The attached patch adds error checks, tests, documentation and a NEWS
entry.
0001-Disallow-reversed-char-ranges-in-rx.patch
Description: Text Data
- Forbid reverse ranges in rx,
Mattias Engdegård <=