Consider the following regex (no unicode):Example:\x04\x05\x41Suppose you search this regex case-insensitively. Would you expect it to search the final \x41 in case-sensitive manner? People whom I ask actually expect such behavior. And such expectations are wrong.Perldoc says:Note that a character expressed as one of these escapes is considered  a character without special meaning by the regex engine, and will  match as is.Which basically means that if the character escaped is printable non special character it's equivalent to just typing that character. And that's how it actually behaves. However if regex is case insensitive alphabetic characters do have a special meaning of this character or same character in opposite case and such special meaning is not ignored in \x sequences. Escape sequences have raw byte semantics, but not always. Does it seem to you like a design awkwardness?Is there a way to cause pcre to treat \x sequences as raw bytes that ignore case sensitivity? Perhaps as a flag? As non standard patch? If no how if at all pcre engine code can be modified to provide such functionality?
pcre case insensitivity: handle escape sequences as raw bytes?
regular expressions;escaping;case insensitivity