I want to use the following variables
Code:
pbseq = "\[\{\("
qbseq = "\]\}\)"
to construct the following dynamic regex pattern
Code:
rl = "^[" pbseq "]|[" qbseq "]$"
What I get is
Code:
warning: escape sequence `\[' treated as plain `['
This could mean that I need some modification to pbseq and qbseq.
The idea is to construct
Code:
rl = "^[\[\{\(]|[\]\}\)]$"
using literal opening [{( and closing ]})