It is hard to tell from your question exactly what you need. Something that will help you in general is to learn more about how to use RegEx. A very helpful site is regexlib
]they have a large library of Regular Expressions. They also have a RegEx tester
] which is very helpful in testing your RegEx code. Also Ultrapico's Expresso
] is a very useful tool for creating regular expressions.