Use \A and \z instead of ^ and $