Moved regex declaration out of request handler