How to use unicategories - 2 common examples

To help you get started, we’ve selected a few unicategories examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ergoithz / browsepy / browsepy / transform / glob.py View on Github external
'.]': 'range_ignore',
            },
        'posix_character_class': {
            ':]': 'range_ignore',
            },
        'posix_equivalence_class': {
            '=]': 'range_ignore',
            },
        'group': {
            '': 'text',
            },
        }
    character_classes = {
        'alnum': (
            # [\p{L}\p{Nl}\p{Nd}]
            unicat['L'] + unicat['Nl'] + unicat['Nd']
            ),
        'alpha': (
            # \p{L}\p{Nl}
            unicat['L'] + unicat['Nl']
            ),
        'ascii': (
            # [\x00-\x7F]
            ranges(((0, 0x80),))
            ),
        'blank': (
            # [\p{Zs}\t]
            unicat['Zs'] + ranges(((9, 10),))
            ),
        'cntrl': (
            # \p{Cc}
            unicat['Cc']
github ergoithz / browsepy / browsepy / transform / glob.py View on Github external
),
        'lower': (
            # \p{Ll}
            unicat['Ll']
            ),
        'print': (
            # \P{C}
            unicat['C']
            ),
        'punct': (
            # \p{P}
            unicat['P']
            ),
        'space': (
            # [\p{Z}\t\n\v\f\r]
            unicat['Z'] + ranges(((9, 14),))
            ),
        'upper': (
            # \p{Lu}
            unicat['Lu']
            ),
        'word': (
            # [\p{L}\p{Nl}\p{Nd}\p{Pc}]
            unicat['L'] + unicat['Nl'] + unicat['Nd'] + unicat['Pc']
            ),
        'xdigit': (
            # [0-9A-Fa-f]
            ranges(((48, 58), (65, 71), (97, 103)))
            ),
        }
    current = 'start'
    deferred = False

unicategories

Unicode category database

MIT
Latest version published 1 year ago

Package Health Score

41 / 100
Full package analysis

Popular unicategories functions

Similar packages