1233件ヒット
[201-300件を表示]
(0.049秒)
別のキーワード
ライブラリ
- English (48)
- ビルトイン (720)
- csv (24)
-
minitest
/ spec (1) -
minitest
/ unit (1) -
net
/ telnet (8) - openssl (36)
- pathname (24)
- rake (12)
-
rdoc
/ context (12) -
rdoc
/ parser (12) -
rexml
/ document (12) -
rubygems
/ gem _ path _ searcher (24) -
rubygems
/ platform (12) -
rubygems
/ spec _ fetcher (24) - scanf (30)
- strscan (144)
クラス
- CSV (24)
- File (24)
-
Gem
:: GemPathSearcher (24) -
Gem
:: Platform (12) -
Gem
:: SpecFetcher (24) - MatchData (264)
-
Net
:: Telnet (8) - Object (1)
- Pathname (24)
-
RDoc
:: Context (12) -
RDoc
:: Parser (12) -
REXML
:: Entity (12) - Regexp (105)
-
Scanf
:: FormatSpecifier (6) -
Scanf
:: FormatString (24) - String (81)
- StringScanner (144)
- Symbol (12)
モジュール
-
File
:: Constants (12) - Kernel (240)
-
MiniTest
:: Assertions (1) -
OpenSSL
:: X509 (36) -
Rake
:: TaskManager (12)
キーワード
-
$ & (12) -
$ & # 39; (12) -
$ 1 (12) -
$ 10 (12) -
$ 11 (12) -
$ 2 (12) -
$ 3 (12) -
$ 4 (12) -
$ 5 (12) -
$ 6 (12) -
$ 7 (12) -
$ 8 (12) -
$ 9 (12) -
$ LAST _ PAREN _ MATCH (12) -
$ MATCH (12) -
$ POSTMATCH (12) -
$ PREMATCH (12) -
$ ` (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - =~ (12)
- DateMatcher (12)
- DateTimeMatcher (12)
- EPROGMISMATCH (12)
-
FNM
_ DOTMATCH (12) -
NEWS for Ruby 3
. 0 . 0 (5) - NoMatchingPatternError (6)
- Regexp (12)
-
V
_ ERR _ AKID _ ISSUER _ SERIAL _ MISMATCH (12) -
V
_ ERR _ AKID _ SKID _ MISMATCH (12) -
V
_ ERR _ SUBJECT _ ISSUER _ MISMATCH (12) - [] (48)
-
assert
_ match (1) - begin (12)
- bytebegin (2)
- byteend (2)
- byteoffset (6)
- captures (12)
-
check
_ until (12) - cmd (4)
- compile (12)
- deconstruct (2)
- end (12)
-
enhance
_ with _ matching _ rule (12) - fetch (12)
-
find
_ matching (12) - fnmatch (24)
- fnmatch? (24)
- gsub (24)
- gsub! (12)
- hash (12)
- inspect (12)
-
last
_ match (24) -
last
_ match _ tried (6) - length (12)
- match? (39)
-
match
_ gen (12) - matched (12)
- matched? (12)
-
matched
_ count (6) -
matched
_ size (12) -
matched
_ string (6) - matchedsize (12)
- matches? (12)
-
matching
_ file? (12) -
matching
_ files (12) -
must
_ match (1) - names (12)
- new (12)
- offset (24)
-
parse
_ files _ matching (12) -
post
_ match (24) -
pre
_ match (24) - prune (6)
- regexp (12)
-
ruby 1
. 6 feature (12) -
rubygems
/ commands / install _ command (12) -
rubygems
/ commands / pristine _ command (12) -
scan
_ full (12) -
scan
_ until (12) - size (12)
-
skip
_ until (12) - string (12)
- sub (24)
- sub! (12)
-
to
_ a (12) -
to
_ s (12) -
unmatched
_ alias _ lists (12) - unscan (12)
-
values
_ at (12) - waitfor (4)
- ~ (12)
- パターンマッチ (12)
- 正規表現 (12)
検索結果
先頭5件
-
Regexp
. last _ match -> MatchData (9243.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
//}... -
StringScanner
# post _ match -> String | nil (9237.0) -
前回マッチを行った文字列のうち、マッチしたところよりも後ろの 部分文字列を返します。前回のマッチが失敗していると常に nil を 返します。
...StringScanner.new('test string')
s.post_match # => nil
s.scan(/\w+/) # => "test"
s.post_match # => " string"
s.scan(/\w+/) # => nil
s.post_match # => nil
s.scan(/\s+/) # => " "
s.post_match # => "string"
s.scan(/\w+/) # => "string"
s.post_match # => ""
s.scan(/\w+/) # => nil
s.post_match # =>... -
StringScanner
# pre _ match -> String | nil (9237.0) -
前回マッチを行った文字列のうち、マッチしたところよりも前の 部分文字列を返します。前回のマッチが失敗していると常に nil を 返します。
...s = StringScanner.new('test string')
s.pre_match # => nil
s.scan(/\w+/) # => "test"
s.pre_match # => ""
s.scan(/\w+/) # => nil
s.pre_match # => nil
s.scan(/\s+/) # => " "
s.pre_match # => "test"
s.scan(/\w+/) # => "string"
s.pre_match # => "test "
s.scan(/\w+/) # => nil
s.pre_match # =>... -
MatchData
# post _ match -> String (9213.0) -
マッチした部分より後ろの文字列を返します($'と同じ)。
...マッチした部分より後ろの文字列を返します($'と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.post_match # => "baz"
//}
@see MatchData#pre_match... -
MatchData
# pre _ match -> String (9213.0) -
マッチした部分より前の文字列を返します($`と同じ)。
...マッチした部分より前の文字列を返します($`と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.pre_match # => "foo"
//}
@see MatchData#post_match... -
MatchData
# regexp -> Regexp (9206.0) -
自身の元になった正規表現オブジェクトを返します。
...自身の元になった正規表現オブジェクトを返します。
//emlist[例][ruby]{
m = /a.*b/.match("abc")
m.regexp # => /a.*b/
//}... -
MatchData
# string -> String (9206.0) -
マッチ対象になった文字列の複製を返します。
...マッチ対象になった文字列の複製を返します。
返す文字列はフリーズ(Object#freeze)されています。
//emlist[例][ruby]{
m = /(.)(.)(\d+)(\d)/.match("THX1138.")
m.string # => "THX1138."
//}... -
StringScanner
# matched -> String | nil (9200.0) -
前回マッチした部分文字列を返します。 前回のマッチに失敗していると nil を返します。
...に失敗していると nil を返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.matched # => nil
s.scan(/\w+/) # => "test"
s.matched # => "test"
s.scan(/\w+/) # => nil
s.matched # => nil
s.scan(/\s+/) # => " "
s.matched # => " "
//}... -
StringScanner
# matched _ size -> Integer | nil (9200.0) -
前回マッチした部分文字列の長さを返します。 前回マッチに失敗していたら nil を返します。
...びい
s = StringScanner.new(utf8.encode(encode))
s.scan(/#{"\u{308B}".encode(encode)}/)
s.matched_size
end
p run("UTF-8") #=> 3
p run("EUC-JP") #=> 2
p run("Shift_Jis") #=> 2
//}
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.matched_size # => nil
s.s......can(/\w+/) # => "test"
s.matched_size # => 4
s.scan(/\w+/) # => nil
s.matched_size # => nil
//}...