Skip to content

Instantly share code, notes, and snippets.

@michaelabon
Forked from RandomOutput/Reg
Last active December 21, 2015 18:39
Show Gist options
  • Save michaelabon/6348991 to your computer and use it in GitHub Desktop.
Save michaelabon/6348991 to your computer and use it in GitHub Desktop.
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())
@RandomOutput
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment