+ 1

difference between ^ $ and \A \Z

whats da difference between r"^1..3

quot; and r"\A1..3\Z"

15th May 2021, 5:00 AM
WÊΠÅÐÑÄŃ
WÊΠÅÐÑÄŃ - avatar
2 odpowiedzi
+ 1
Read Regular Expression in python course
15th May 2021, 6:37 AM
Sâñtôsh
Sâñtôsh - avatar
+ 1
Dragon Wolf you raised a good question. It seems like they have the same function when we used them in regular expression. However, they differ in matching multiple lines. ^ can match at the start of the string and after each line break. \A only ever matches at the start of the string $ can match at the end of the string and before each line break. \Z only ever matches at the end of the string. https://stackoverflow.com/questions/4250062/what-is-the-difference-between-and-a-and-z-in-regex https://docs.python.org/3/library/re.html
15th May 2021, 8:18 AM
Endalk
Endalk - avatar