Using regex in Python I want to get the word "net" from string and if the word "wt" is the next, get too Example: string = "12 boxes net wt 1.oz 3.6g" #Must returns "net wt" string = "12 boxes net 1.oz 3.6g" #Must returns "net" Between "net" and "wt" could be "." "," or spaces I used this regex but didn't work on the second example pat = r'net([,.\s]*?)(wt?)' Continue reading...