[Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns
bug #12235 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns (webmozart)

This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5307
| License       | MIT
| Doc PR        | -

According to my own testing, this should fix the generation of HTML patterns when `Regex::$match` is set to false. Additionally, patterns containing pipes (or statements) are fixed. See the test cases for examples.

Commits
-------

bf006f5 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns