Are you sure you need a regex? It seems that you only need to know if a word is present in a string, so you can do:
>>> line="This,is,a,sample,string"
>>> "sample" in line
True
Are you sure you need a regex? It seems that you only need to know if a word is present in a string, so you can do:
>>> line="This,is,a,sample,string"
>>> "sample" in line
True