title: Python to scan string which consists of various other strings
body: <p>I have a huge string which actually contains lots of other substrings. When I am running my code it's not able to scan the string properly and returns false value. </p>
  
  <p>Goal: I am trying to search specific value in string and want to store it in to variable.</p>
  
  <pre><code>Code`import re
  mystring = "This 'is' the 'test' I am doing"
  searchObj = re.search( r'(.*) test (.*?) .*', mystring, re.M|re.I)
  
  if searchObj:
     print "searchObj.group() : ", searchObj.group()
     print "searchObj.group(1) : ", searchObj.group(1)
     print "searchObj.group(2) : ", searchObj.group(2)
  else:
     print "Null"`
  </code></pre>
  
  <p>Effort: I have gone through various regex tutorials and tried various different way in which scanning simple string like "This is the test I am doing" is success but if the string is having substring wouldn't work.</p>
  
  <p>New to python and regex any help would be greatly appreciated.</p>