Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

full unicode casefolding in Python (case-insensitive search for keywords)

View casefold.py
1 2 3 4 5
import regex # pip install regex
keywords = ['post', 'another']
p = regex.compile(ur'(?fi)\L<keywords>', keywords=keywords)
p.findall(u'POST, Post, post, poſt, post, and poſt')
# -> [u'POST', u'Post', u'post', u'po\u017ft', u'po\ufb06', u'po\ufb05']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.