[ create a new paste ] login | about

Link: http://codepad.org/uBGkBVo0    [ raw code | output | fork ]

Python, pasted on Nov 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import re
def string_found(string1, string2):
   if re.search(r"\b" + re.escape(string1) + r"\b", string2):
      return True
   return False

string1 = "ADDLESHAW GODDARD"
string2 = "ADDLESHAW GODDARD LLP"
if string_found(string1, string2):
    print "Yes"
string1 = "ADVANCE"
string2 = "ADVANCED BUSINESS EQUIPMENT LTD"
if string_found(string1, string2):
    print "Yes"


Output:
1
Yes


Create a new paste based on this one


Comments: