in reply to regex match question

But what if you have %%%q? Should it match the %q or not? If it should, you might want to use:
s/(%.)/$1 eq "%q" ? "" : $1/eg;

Abigail