るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.096秒)
トップページ > クエリ:t[x] > クラス:Regexp[x] > クエリ:compile[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

Regexp.compile(string, option = nil) -> Regexp (18256.0)

文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

...string をコンパイルして正規表現オブジェクトを生成して返します。

第一引数が正規表現であれば第一引数を複製して返します。第二引数は警告の上無視されます。

@param string 正規表現を文字列として与えます。

@param opti...
...on Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp
::EXTENDED
の論理和を指定します。
Integer 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp
::IGNORECASE の指定と...
...なります。

@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。

//emlist[例][ruby]{
str = "This is Regexp"
t
1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t
1.match(str)
p $~ # => "This is Regexp"

t
2 = Regexp.compile('
t
his # ここは...

Regexp.compile(string, option = nil, code = nil) -> Regexp (18256.0)

文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

...文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

第一引数が正規表現であれば第一引数を複製して返します。第二、第三引数は警告の上無視されます。

@param string 正規表現を文字列として与えま...
...@param option Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp
::EXTENDED
の論理和を指定します。
Integer 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp
::IGNORECASE...
...I-8BIT になります。
それ以外の指定は警告を出力します。

@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。

//emlist[例][ruby]{
str = "This is Regexp"
t
1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t
1.match(str)
p...

Regexp.new(string, option = nil) -> Regexp (3156.0)

文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

...string をコンパイルして正規表現オブジェクトを生成して返します。

第一引数が正規表現であれば第一引数を複製して返します。第二引数は警告の上無視されます。

@param string 正規表現を文字列として与えます。

@param opti...
...on Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp
::EXTENDED
の論理和を指定します。
Integer 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp
::IGNORECASE の指定と...
...なります。

@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。

//emlist[例][ruby]{
str = "This is Regexp"
t
1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t
1.match(str)
p $~ # => "This is Regexp"

t
2 = Regexp.compile('
t
his # ここは...

Regexp.new(string, option = nil, code = nil) -> Regexp (3156.0)

文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

...文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

第一引数が正規表現であれば第一引数を複製して返します。第二、第三引数は警告の上無視されます。

@param string 正規表現を文字列として与えま...
...@param option Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp
::EXTENDED
の論理和を指定します。
Integer 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp
::IGNORECASE...
...I-8BIT になります。
それ以外の指定は警告を出力します。

@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。

//emlist[例][ruby]{
str = "This is Regexp"
t
1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t
1.match(str)
p...

Regexp#~ -> Integer | nil (107.0)

変数 $_ の値との間でのマッチをとります。

...mlist[][ruby]{
self =~ $_
//}

//emlist[例][ruby]{
$_ = "hogehoge"

if /foo/
puts "match"
else
puts "no match"
end
# => no match
# ただし、警告がでる。warning: regex literal in condition

reg = Regexp.compile("foo")

if ~ reg
puts "match"
else
puts "no match"
end
# => no match...
...if reg
puts "match"
else
puts "no match"
end
# => match
# reg は nil でも false でも無いので常にtrue
//}...

絞り込み条件を変える