End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
URI::RFC2396_Parser#extract
extract( str )
extract( str, schemes )
extract( str, schemes ) {|item| block }
lib/uri/rfc2396_parser.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/uri/rfc2396_parser.rb, line 249
def extract(str, schemes = nil)
if block_given?
str.scan(make_regexp(schemes)) { yield $& }
nil
else
result = []
str.scan(make_regexp(schemes)) { result.push $& }
result
end
end
Args
str-
Stringto search schemes-
Patterns to apply to
str
Description
Attempts to parse and merge a set of URIs. If no block given, then returns the result, else it calls block for each element in result.
See also URI::Parser.make_regexp.
See also
#escape
#initialize_pattern
#convert_to_uri
#initialize_regexp
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0