REGEX-Escape from: PS1="\[\e[33;40m\][QA]\[\e[m\] $PS1"

Your Input:
Result, the escaped string:
PS1\="\\\[\\e\[33;40m\\\]\[QA\]\\\[\\e\[m\\\] \$PS1"

What must the escaping look like for:
PS1="\[\e[33;40m\][QA]\[\e[m\] $PS1"

The excaped text for use in a regex is:
PS1\="\\\[\\e\[33;40m\\\]\[QA\]\\\[\\e\[m\\\] \$PS1"


Ads