fixes BUG-46572: ws tests fail having modules in development
When not having modules in development the response of the request to get the CSRF token is minified. Test making use of it looked for the token assuming it was minified making it fail when it was not.
The regexp to look for the token has been extended to allow optional blank spaces, also it has been simplified getting in a group directly the token value instead of parsing it afterward.