Switch to \A instead of ^ and \Z instead of $.
Code cleanup.