I want to use regular expression to match a file name with a given file name pattern. The pattern can be like "*.log", or "*.log.2*".
For example, I have a file name like this: "xxx.log.2007.04.04"
Then "*.log" will not match this file name.
But "*.log.2*" will match this file name.
How do I construct the regular expression to use the pattern "*.log" and "*.log.2*" then? Thanks.