escape '[' and ']' in regexpr.