Prova con le regular expressions
http://tinyurl.com/5xhvx

HTH