607件ヒット
[1-100件を表示]
(0.045秒)
ライブラリ
- English (24)
- ビルトイン (252)
- csv (72)
- forwardable (24)
- openssl (36)
- rake (24)
- rss (48)
-
rubygems
/ remote _ fetcher (12) - scanf (18)
- socket (12)
クラス
- CSV (72)
-
Encoding
:: Converter (36) -
Enumerator
:: ArithmeticSequence (14) -
Enumerator
:: Lazy (48) -
Gem
:: RemoteFetcher (12) -
OpenSSL
:: X509 :: CRL (24) -
RSS
:: Maker :: ChannelBase (24) -
RSS
:: Rss :: Channel (24) - Regexp (24)
-
Scanf
:: FormatString (18) -
Socket
:: AncillaryData (12) - Thread (18)
モジュール
- Enumerable (72)
- Forwardable (24)
- Kernel (44)
-
OpenSSL
:: X509 (12) - Process (8)
- Rake (24)
キーワード
-
$ ? (8) -
$ LAST _ MATCH _ INFO (12) -
$ LAST _ PAREN _ MATCH (12) -
$ ~ (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - MatchData (12)
-
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) -
V
_ ERR _ ERROR _ IN _ CRL _ LAST _ UPDATE _ FIELD (12) - application (12)
- application= (12)
-
chunk
_ while (12) - delegate (12)
- generate (12)
- instance (24)
-
instance
_ delegate (12) - lastBuildDate (24)
- lastBuildDate= (24)
-
last
_ match (24) -
last
_ match _ tried (6) -
last
_ spec (6) -
last
_ spec _ tried (6) -
last
_ status (8) -
last
_ update (12) -
last
_ update= (12) - new (48)
-
open
_ uri _ or _ path (12) - read (12)
- readlines (12)
-
report
_ on _ exception= (18) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
slice
_ after (24) -
slice
_ before (24) -
slice
_ when (12) -
take
_ while (24) - toklast (12)
- zip (24)
- パターンマッチ (12)
検索結果
先頭5件
-
Enumerator
:: ArithmeticSequence # last -> Numeric | nil (21102.0) -
等差数列の最後の要素、もしくは最後の n 要素を返します。
等差数列の最後の要素、もしくは最後の n 要素を返します。
@param n 取得する要素数。 -
Enumerator
:: ArithmeticSequence # last(n) -> [Numeric] (21102.0) -
等差数列の最後の要素、もしくは最後の n 要素を返します。
等差数列の最後の要素、もしくは最後の n 要素を返します。
@param n 取得する要素数。 -
Scanf
:: FormatString # last _ match _ tried (15201.0) -
@todo
@todo -
Regexp
. last _ match -> MatchData (12443.0) -
カレントスコープで最後に行った正規表現マッチの MatchData オ ブジェクトを返します。このメソッドの呼び出しは $~ の参照と同じです。
...MatchData オ
ブジェクトを返します。このメソッドの呼び出しは $~
の参照と同じです。
//emlist[例][ruby]{
/(.)(.)/ =~ "ab"
p Regexp.last_match # => #<MatchData:0x4599e58>
p Regexp.last_match[0] # => "ab"
p Regexp.last_match[1] # => "a"
p Regexp.last_match[2]......# => "b"
p Regexp.last_match[3] # => nil
//}... -
Kernel
$ $ LAST _ MATCH _ INFO -> MatchData | nil (12419.0) -
$~ の別名
...f=https://www.ruby-lang.org/en/about/license.txt>license</a>"
if /<a href=(.+?)>/ =~ str
p $LAST_MATCH_INFO[0] #=> "<a href=https://www.ruby-lang.org/en/about/license.txt>"
p $LAST_MATCH_INFO[1] #=> "https://www.ruby-lang.org/en/about/license.txt"
p $LAST_MATCH_INFO[2] #=> nil
end... -
Process
. last _ status -> Process :: Status | nil (12313.0) -
カレントスレッドで最後に終了した子プロセスのステータスを返します。
...。
Process.wait Process.spawn("ruby", "-e", "exit 13")
Process.last_status # => #<Process::Status: pid 4825 exit 13>
カレントスレッドで子プロセスを実行したことがない場合は nil を返します。
Process.last_status # => nil
@see Process::Status
@see $?... -
Regexp
. last _ match(nth) -> String | nil (12273.0) -
整数 nth が 0 の場合、マッチした文字列を返します ($&)。それ以外では、nth 番目の括弧にマッチ した部分文字列を返します($1,$2,...)。 対応する括弧がない場合やマッチしなかった場合には nil を返し ます。
..."ab"
p Regexp.last_match # => #<MatchData:0x4599e58>
p Regexp.last_match(0) # => "ab"
p Regexp.last_match(1) # => "a"
p Regexp.last_match(2) # => "b"
p Regexp.last_match(3) # => nil
//}
正規表現全体がマッチしなかった場合、引数なしの
Regexp.last_match はnil を......返すため、
last_match[1] の形式では例外 NoMethodError が発生します。
対して、last_match(1) は nil を返します。
//emlist[例][ruby]{
str = "This is Regexp"
/That is Regexp/ =~ str
p Regexp.last_match # => nil
begin
p Regexp.last_match[1] # 例外が発生する
rescue......puts $! # => undefined method `[]' for nil:NilClass
end
p Regexp.last_match(1) # => nil
//}
@param nth 整数を指定します。
整数 nth が 0 の場合、マッチした文字列を返します。それ以外では、nth 番目の括弧にマッチした部分文字列を返します。... -
OpenSSL
:: X509 :: CRL # last _ update=(time) (12207.0) -
CRL が最後に更新された日時を Time オブジェクトで設定します。
...CRL が最後に更新された日時を Time オブジェクトで設定します。
@param time 最終更新日時
@raise OpenSSL::X509::CRLError 設定に失敗した場合に発生します
@see OpenSSL::X509::CRL#last_update... -
Kernel
$ $ LAST _ PAREN _ MATCH -> String | nil (12201.0) -
$+ の別名
...別名
require "English"
r1 = Regexp.compile("<img src=(http:.+?)>")
r2 = Regexp.compile("<a href=(http|ftp).+?>(.+?)</a>")
while line = DATA.gets
[ r1, r2 ].each {|rep|
rep =~ line
p $+
}
end
__END__
<tr> <td><img src=http://localhost/a.jpg></td> <td>ikkou</td>... -
OpenSSL
:: X509 :: CRL # last _ update -> Time (12201.0) -
CRL が最後に更新された日時を Time オブジェクトで返します。
CRL が最後に更新された日時を Time オブジェクトで返します。