Avoid a variable and use trim instead of regexp in the test