I love the match pattern vi for these types of tasks. It is in the string section of the function palette. I have included an example written in LV7. Once you figure out the RegularExpression format, you will find this function to be the most powerful tool for these types of tasks.
-jayme
jc
Mac 10.4
LV7.1
CLD