Why don character ranges work properly (POSIX mode only)?
A. The POSIX standard specifies that character range expressions are locale sensitive – so for example the expression [A-Z] will match any collating element that collates between ‘A’ and ‘Z’. That means that for most locales other than “C” or “POSIX”, [A-Z] would match the single character ‘t’ for example, which is not what most people expect – or at least not what most people have come to expect from regular expression engines. For this reason, the default behaviour of Boost.Regex (perl mode) is to turn locale sensitive collation off by not setting the regex_constants::collate compile time flag. However if you set a non-default compile time flag – for example regex_constants::extended or regex_constants::basic, then locale dependent collation will be enabled, this also applies to the POSIX API functions which use either regex_constants::extended or regex_constants::basic internally. [Note – when regex_constants::nocollate in effect, the library behaves “as if” the LC_COLLATE locale ca