6 ms·
Note that Ruby also has \z which is what you generally want instead of \Z. (\Z allows a trailing newline, \z does not)
by brobinson 2y ago
Note that Ruby also has \z which is what you generally want instead of \Z.
(\Z allows a trailing newline, \z does not)
- dwheeler 2y agoYou 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.