How to use the unicategories.categories function in unicategories

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 2 years ago

Package Health Score

39 / 100
Full package analysis

Popular unicategories functions