Type pattern replacement syntax

Do you think the regex is conservative enough?