2fdabb14fd48534243b2e472995f4bec432ed493,textacy/constants.py,,,#,10
Before Change
EMAIL_REGEX = re.compile(r"(?:^|(?<=[^\w@.)]))([\w+-](\.(?!\.))?)*?[\w+-]@(?:\w-?)*?\w+(\.([a-z]{2,})){1,3}(?:$|(?=\b))", flags=re.IGNORECASE | re.UNICODE)
PHONE_REGEX = re.compile(r"(?:^|(?<=[^\w)]))(\+?1[ .-]?)?(\(?\d{3}\)?[ .-]?)?\d{3}[ .-]?\d{4}(\s?(?:ext\.?|[//x-])\s?\d{2,6})?(?:$|(?=\W))")
NUMBERS_REGEX = re.compile(r"(?:^|(?<=[^\w,.]))[+–-]?(([1-9]\d{0,2}(,\d{3})+(\.\d*)?)|([1-9]\d{0,2}([ .]\d{3})+(,\d*)?)|(\d*?[.,]\d+)|\d+)(?:$|(?=\b))")
PUNCT_REGEX = re.compile("[{0}]+".format(re.escape(string.punctuation)))
CURRENCY_REGEX = re.compile("[{0}]+".format("".join(CURRENCIES.keys())))
LINEBREAK_REGEX = re.compile(r"((\r\n)|[\n\v])+")
NONBREAKING_SPACE_REGEX = re.compile(r"(?!\n)\s+")
URL_REGEX = re.compile(
After Change
i for i in range(sys.maxunicode)
if unicodedata.category(chr_(i)).startswith("P"))
PUNCT_TRANSLATE_BYTES = b"".join(
chr_(i).encode("utf8") for i in PUNCT_TRANSLATE_UNICODE.keys())
ACRONYM_REGEX = re.compile(r"(?:^|(?<=\W))(?:(?:(?:(?:[A-Z]\.?)+[a-z0-9&/-]?)+(?:[A-Z][s.]?|[0-9]s?))|(?:[0-9](?:\-?[A-Z])+))(?:$|(?=\W))", flags=re.UNICODE)
EMAIL_REGEX = re.compile(r"(?:^|(?<=[^\w@.)]))([\w+-](\.(?!\.))?)*?[\w+-]@(?:\w-?)*?\w+(\.([a-z]{2,})){1,3}(?:$|(?=\b))", flags=re.IGNORECASE | re.UNICODE)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: chartbeat-labs/textacy
Commit Name: 2fdabb14fd48534243b2e472995f4bec432ed493
Time: 2017-05-07
Author: burton@chartbeat.com
File Name: textacy/constants.py
Class Name:
Method Name:
Project Name: regel/loudml
Commit Name: 1f9b13ec98b3b0f2443caf549f69790a52cc0a70
Time: 2020-04-13
Author: sebastien.regel@gmail.com
File Name: loudml/opentsdb.py
Class Name: OpenTSDBClient
Method Name: put
Project Name: pantsbuild/pants
Commit Name: 1ae352138a76085f32967e4587495654c32c06f5
Time: 2016-01-04
Author: wangpeiyu@gmail.com
File Name: src/python/pants/backend/jvm/tasks/classpath_util.py
Class Name: ClasspathUtil
Method Name: create_canonical_classpath