Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

URI::RFC2396_Parser#extract

(::String str, ?::Array[::String] schemes) -> ::Array[::String]
(::String str, ?::Array[::String] schemes) { (::String) -> untyped } -> nil
extract( str )
extract( str, schemes )
extract( str, schemes ) {|item| block }

Args

str

String to 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 make_regexp.