[pcre-dev] [Bug 2512] New: Feature Request: Character class …

Etusivu
Poista viesti
Lähettäjä: admin
Päiväys:  
Vastaanottaja: pcre-dev
Aihe: [pcre-dev] [Bug 2512] New: Feature Request: Character class subtraction (like W3C does)
https://bugs.exim.org/show_bug.cgi?id=2512

            Bug ID: 2512
           Summary: Feature Request: Character class subtraction (like W3C
                    does)
           Product: PCRE
           Version: 10.34 (PCRE2)
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: wishlist
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: kkilger@???
                CC: pcre-dev@???


In W3C REGEX Standard, there is the possibility to have "character class
subtractions", e.g.

[\p{L}-[\p{Arabic}]]              (all letters except Arabic)
[\p{L}-[L]]                       (all letters except "L")


Alternatively one could this express this via some "AND" operator

[\p{L}&[^\p{Arabic}]]

I don't know if there is some perlish syntax which is "free" and unambigous.
But as far as I know there is no possibility to simulate something like this in
PCRE.

This regex's are used in XML schema validations and forces me to support
different libraries (besides PCRE2) in my software. Also this gives new kinds
of freedom and may yield to simpler expressions sometimes.

[1] See: https://www.regular-expressions.info/charclasssubtract.html

--
You are receiving this mail because:
You are on the CC list for the bug.