[ruby-core:105822] [Ruby master Bug#18271] Regexp inconsistency (repeatable)
From:
"hanHoll (Han Holl)" <noreply@...>
Date:
2021-10-27 11:45:49 UTC
List:
ruby-core #105822
Issue #18271 has been reported by hanHoll (Han Holl).
----------------------------------------
Bug #18271: Regexp inconsistency (repeatable)
https://bugs.ruby-lang.org/issues/18271
* Author: hanHoll (Han Holl)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
han:~/au> irb >> st = 'A. C. Cobble'
=> "A. C. Cobble"
>> st.gsub(/\. ([A-Z])(?=\.)/, ".#{$1}")
=> "A.. Cobble"
>> st.gsub(/\. ([A-Z])(?=\.)/, ".#{$1}")
=> "A.C. Cobble"
>> RUBY_VERSION
=> "3.0.2"
>>
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>