Select "Match case", "Regex" and set "File mask" to "*.py" Search string: ([\n\s,=\+\[\{\(])b('[^\n]*?'|"[^\n]*?")([\n\s,\]\}\)]) Replace string: $1$2$3