Accept valid regex patterns in explicit host conditions

Werk #18988 introduced validation of regex patterns in explicit host
conditions. However, valid regex patterns starting with ~ were
afterwards incorrectly rejected as invalid hostnames: after a successful
regex compile, the code fell through to hostname validation, which
rightfully refused the regex as a host name.

Valid regex patterns are now accepted again. Invalid ones still produce
a clear error message, as intended by werk #18988.

To the list of all Werks

Read more here: Source link