What is the regex for: somewhere in the string find "wordA" followed by anything till "wordB"? I'm able to get the tags but due to the nested tags it adds too many tags. I think the solution would be in a proper match of the opening and closing tag. I can't find a website with properly described regex rules that is not either overwhelming or very obtuse. Please help me find a good one. Would really appreciate it!!