In regular expressions:
- What is the difference between
^and\A? - What is the difference between
$and\Z?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In single-line mode,
$matches either the end of the string, or just before the newline at the end of the string. In multiline mode$matches before each newline in the string.\Zalways matches only the end of the string regardless of the line mode. Same with^versus\A.