Why do regexes use `$` and `^` as line anchors?
buttondown.email
Why do regexes use `$` and `^` as line anchors?
1–10 of 19 posts
Re: Why do regexes use `$` and `^` as line anchors?
#2Ken is still around; did the author reach out and ask? Could be a similar story to Rob Pike and the Go date format: he didn't think about it and just picked the first thing that came to mind.
Re: Why do regexes use `$` and `^` as line anchors?
#3[flagged]
Re: Why do regexes use `$` and `^` as line anchors?
#4This always made sense to me because they are next to each other on an AZERTY keyboard:
tab,A,Z,E,R,T,Y,U,I,O,P,^,$,return
Re: Why do regexes use `$` and `^` as line anchors?
#5Ken is still around; did the author reach out and ask? Could be a similar story to Rob Pike and the Go date format: he didn't think about it and just picked the first thing that came to mind.
The article devolves from fact to fiction/guesswork rather quickly.
Re: Why do regexes use `$` and `^` as line anchors?
#6This always made sense to me because they are next to each other on an AZERTY keyboard: tab,A,Z,E,R,T,Y,U,I,O,P,^,$,return
Another roman car like effect.
Re: Why do regexes use `$` and `^` as line anchors?
#7[deleted]
Re: Why do regexes use `$` and `^` as line anchors?
#8This article should be considered the $ word on this topic.
Re: Why do regexes use `$` and `^` as line anchors?
#9[flagged]
I clicked this link because the question is interesting. Yes the answer won't change my life, or even make me more money, but it got me curious. That's why I don't think your response is helpful or insightful.
Re: Why do regexes use `$` and `^` as line anchors?
#10Not sure about $ sign, but ^ probably comes from ADM-3A:
https://en.wikipedia.org/wiki/ADM-3A#Legacy
And here is a photo of its keyboard: https://twitter.com/toresbe/status/1756800589340549609/photo...