in reply to how to automate the regular expression match from a file?

You didn't tell us any details about the problem you are having. Maybe this will be of use: