Improved example substitutions and regex rules