Skip to content

Instantly share code, notes, and snippets.

@madprime
Last active December 29, 2015 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madprime/7607994 to your computer and use it in GitHub Desktop.
Save madprime/7607994 to your computer and use it in GitHub Desktop.
import re
re_test = r'(is.*a)'
teststr = r"""This is
a test"""
if re.search(re_test, teststr, re.M | re.S):
print "Found"
print re.sub(re_test, '', teststr, re.M | re.S)
@madprime
Copy link
Author

Why is it "Not found"? How do I make it "Found"??

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