Skip to content

Instantly share code, notes, and snippets.

@ep4sh
Last active December 9, 2017 05:54
Show Gist options
  • Save ep4sh/c9748302ac82a6989ae0023a635a8380 to your computer and use it in GitHub Desktop.
Save ep4sh/c9748302ac82a6989ae0023a635a8380 to your computer and use it in GitHub Desktop.
GG WP: freelance work
import re
p = re.compile('order-.*-online')
with open("str.txt","r") as f:
file_str = f.read()
lst = re.findall(p, file_str)
for i in lst:
print(i.replace("_","-"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment