in reply to How to replace in one regexp

Written as two statements, your expressions are clear. Why confuse the issue by writing them as one?

"Optimize" does not mean "use as few statements as possible."