Actions
Bug #5900
closedRegExp – Newline and \Z Anchor
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]
Backport:
Description
/\Aaaa\Z/ =~ "aaa\n"
=> 0 #and should be nil
Same result in MRI 1.9.2.
Updated by naruse (Yui NARUSE) over 12 years ago
- Status changed from Open to Rejected
It is expected behavior.
See doc/re.rdoc:
-
\Z - Matches end of string. If string ends with a newline,
it matches just before newline - \z - Matches end of string
Actions
Like0
Like0