Hi,
now and then I'm using quotas (\QTheLiteralText\E) in regex, for example to /filter case sensitive, and/or to /filter -g multiple expressions like /(?:\QexpressionA\E)|(?:\QexpressionB\E)|(?:\QexpressionC\E)/ (sceme only).

Using \Q\E had been handy, as I didn't need to excape metachars separately - especially if the regex matchtext isn't statical (users input, part of $fulladdresses etc).
Now, this isn't working if the escaped text (or what I expect to be escaped) contains metachars AND word boundaries come into play.

No word boundary in regex; all true:
Code:
//var %txt = test | echo -a $regex(%txt,/\Qtest\E/) 
//var %txt = xx test xx | echo -a $regex(%txt,/\Qtest\E/) 

//var %txt = \d^ | echo -a $regex(%txt,/\Q\d^\E/) 
//var %txt = xx [a] xx | echo -a $regex(%txt,/\Q[a]\E/)

Still true, word boundary in regex:
Code:
//var %txt = test | echo -a $regex(%txt,/\b\Qtest\E\b/) 
//var %txt = xx test xx | echo -a $regex(%txt,/\b\Qtest\E\b/)

FALSE, word boundary in regex:
Code:
//var %txt = \d^ | echo -a $regex(%txt,/\b\Q\d^\E\b/) 
//var %txt = xx [a] xx | echo -a $regex(%txt,/\b\Q[a]\E\b/)

....even more irritating: this one IS true:
Code:
//var %txt = xx [a] xx | echo -a $regex(%txt,/\B\Q[a]\E\B/)

I'd really appreciate an explanation of this behaviour (looks like I misconceive the way \Q\E work) and, furthermore, a workaround.
I'd like to keep on using \Q\E instead of an ugly $replacex(string of all the possible metachars to escape)
Thanks!