22件ヒット
[1-22件を表示]
(0.032秒)
別のキーワード
検索結果
先頭2件
-
Regexp
. compile(string , option = nil , code = nil) -> Regexp (27.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...tion Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp::EXTENDED
の論理和を指定します。
Integer 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE の指定と......t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p $~ # => "This is Regexp"
t2 = Regexp.compile('
this # ここは使用されない
\ is
\ regexp # ここも使用されない
', Regexp::EXTENDED | Regexp::IGNORECASE)
t2.match(str)
p Regexp.last_match # => "This... -
Regexp
. new(string , option = nil , code = nil) -> Regexp (27.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...tion Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp::EXTENDED
の論理和を指定します。
Integer 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE の指定と......t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p $~ # => "This is Regexp"
t2 = Regexp.compile('
this # ここは使用されない
\ is
\ regexp # ここも使用されない
', Regexp::EXTENDED | Regexp::IGNORECASE)
t2.match(str)
p Regexp.last_match # => "This...