Fix bug #9 - Add timeout on regex match to avoid DoS attacks