[ruby-core:111591] [Ruby master Feature#19303] Resolv::IPv4::Regex variant without anchors

3 Jan
2023
3 Jan
'23
12:34 p.m.
Issue #19303 has been reported by henk (Hendrik Jäger). ---------------------------------------- Feature #19303: Resolv::IPv4::Regex variant without anchors https://bugs.ruby-lang.org/issues/19303 * Author: henk (Hendrik Jäger) * Status: Open * Priority: Normal ---------------------------------------- ``` ruby require 'resolv' p "match this IP: 10.0.0.1"[/match this IP: (#{Resolv::IPv4::Regex})/, 1] ``` This returns 'nil' because Resolv::IPv4::Regex is anchored with \A and \z. I would like to have a variant of Resolv::IPv4::Regex available that is not anchored so that code would return '10.0.0.1'. -- https://bugs.ruby-lang.org/
943
Age (days ago)
943
Last active (days ago)
0 comments
1 participants
participants (1)
-
henk