Better regex (related to issue 7386)