in reply to Re: Re: regex match question
in thread regex match question

That doesn't work if %q starts the line - try
/^%q|[^%]%q/

or use the negative look behind
/(?<!%)%q/