While the improvement should be safe, I'm not applying it to LTS branches for now as the regular expression was exposed as internal API and the change doesn't seem important enough to risk any breakage.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.