Merge the solution to PR 15390 from HEAD (allow choice of regular expression implementation) PR: 15390 PR: 30185