in reply to Strange regular expression warning

I'll comment on the regex: If you are interested in how the filename ends, you don't need to worry about how it starts. Try using:

/\.ORD_API_log$/

...which doesn't root the match to the beginning of the string (and explicitly looks for a period before the extension).