I am not 100% clear on your output requirement, But I have a feeling that may be Contains function will work for you.
Please check the below thread http://community.tableau.com/thread/134646
let us know If its not helpful.
I'm pretty sure that will do the trick. Thank you!
What if there is a tag AA?