[maint] Escape ']' in regular expression