-
-
Save michaelabon/6348991 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
res = re.findall('[a-zA-Z]{2,}\s*\+\+', testString) | |
if len(res) > 0: | |
for match in res: | |
pos_results.append(match.lower()) | |
res = re.findall('\+\+\s*[a-zA-Z]{2,}', testString) | |
if len(res) > 0: | |
for match in res: | |
pos_results.append(match.lower()) | |
res = re.findall('[a-zA-Z]{2,}\s*--', testString) | |
if len(res) > 0: | |
for match in res: | |
neg_results.append(match.lower()) | |
res = re.findall('--\s*[a-zA-Z]{2,}', testString) | |
if len(res) > 0: | |
for match in res: | |
neg_results.append(match.lower()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/RandomOutput/6348986