in reply to pattern match
To help you with your question, you'll need to give us a bit more detail:
In the meantime, you may find perlretut helpful. It explains how to use regular expressions to search for patterns in strings.
Best, beth