Skip to content

Instantly share code, notes, and snippets.

@tridungduong16
Last active August 10, 2018 03:31
Show Gist options
  • Save tridungduong16/4c9ba3369693658d3795d3cc73addf5e to your computer and use it in GitHub Desktop.
Save tridungduong16/4c9ba3369693658d3795d3cc73addf5e to your computer and use it in GitHub Desktop.
Regular Experession

Macth phrase without number

phrase= "The Knicks game yesterday was great!!! The Knicks won 112-92 at MSG"
patterns= [r'((?:[^\d\W]+\s*)+)']
for p in patterns:
    match= re.findall(p, phrase)
    print(match)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment