Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
brobinson
· 2y ago · 0 comments
Note that Ruby also has \z which is what you generally want instead of \Z.
(\Z allows a trailing newline, \z does not)
Comments
[–]
dwheeler
2y ago
You want \Z in Python, and \z in most other languages, to match on end of string. But in some languages $ really does match end of string. As always, you must check your docs.