別のキーワード
ライブラリ
- English (48)
- ビルトイン (716)
- 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 (260)
-
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)
- 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件
-
String
# match(regexp , pos = 0) -> MatchData | nil (21412.0) -
regexp.match(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match を参照してください。
...regexp.match(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match を参照してください。
//emlist[例: regexp のみの場合][ruby]{
'hello'.match('(.)\1') # => #<MatchData "ll" 1:"l">
'hello'.match('(.)\......# => "ll"
'hello'.match(/(.)\1/)[0] # => "ll"
'hello'.match('xx') # => nil
//}
//emlist[例: regexp, pos を指定した場合][ruby]{
'hoge hige hege bar'.match('h.ge', 0) # => #<MatchData "hoge">
'hoge hige hege bar'.match('h.ge', 1) # => #<MatchData "hige">
//}
//emlist[例......: ブロックを指定した場合][ruby]{
'hello'.match('(.)\1'){|e|"match #{$1}"} # => "match l"
'hello'.match('xx'){|e|"match #{$1}"} # マッチしないためブロックは実行されない
//}
@see Regexp#match, Symbol#match... -
String
# match(regexp , pos = 0) {|m| . . . } -> object (21312.0) -
regexp.match(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match を参照してください。
...regexp.match(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match を参照してください。
//emlist[例: regexp のみの場合][ruby]{
'hello'.match('(.)\1') # => #<MatchData "ll" 1:"l">
'hello'.match('(.)\......# => "ll"
'hello'.match(/(.)\1/)[0] # => "ll"
'hello'.match('xx') # => nil
//}
//emlist[例: regexp, pos を指定した場合][ruby]{
'hoge hige hege bar'.match('h.ge', 0) # => #<MatchData "hoge">
'hoge hige hege bar'.match('h.ge', 1) # => #<MatchData "hige">
//}
//emlist[例......: ブロックを指定した場合][ruby]{
'hello'.match('(.)\1'){|e|"match #{$1}"} # => "match l"
'hello'.match('xx'){|e|"match #{$1}"} # マッチしないためブロックは実行されない
//}
@see Regexp#match, Symbol#match... -
Regexp
# match(str , pos = 0) -> MatchData | nil (21304.0) -
指定された文字列 str に対して位置 pos から自身が表す正規表現によるマッ チングを行います。マッチした場合には結果を MatchData オブジェクトで返し ます。 マッチしなかった場合 nil を返します。
...字列 str に対して位置 pos から自身が表す正規表現によるマッ
チングを行います。マッチした場合には結果を MatchData オブジェクトで返し
ます。
マッチしなかった場合 nil を返します。
省略可能な第二引数 pos を指定すると......captures) # => ["b", "r"]
p(/(.).(.)/.match("foobar", -3).captures) # => ["b", "r"]
//}
pos を指定しても MatchData#offset 等の結果
には影響しません。つまり、
//emlist[][ruby]{
re.match(str[pos..-1])
//}
と
//emlist[][ruby]{
re.match(str, pos)
//}
は異なります。......os のデフォルト値は 0)。
//emlist[例][ruby]{
reg = Regexp.new("foo")
if reg.match("foobar")
puts "match"
end
# => match
p reg.match("foobar") # => #<MatchData:0x29403fc>
p reg.match("bar") # => nil
p /(foo)(bar)(baz)/.match("foobarbaz").to_a.values_at(1,2,3) # => ["foo", "bar", "b... -
Regexp
# match(str , pos = 0) {|m| . . . } -> object | nil (21204.0) -
指定された文字列 str に対して位置 pos から自身が表す正規表現によるマッ チングを行います。マッチした場合には結果を MatchData オブジェクトで返し ます。 マッチしなかった場合 nil を返します。
...字列 str に対して位置 pos から自身が表す正規表現によるマッ
チングを行います。マッチした場合には結果を MatchData オブジェクトで返し
ます。
マッチしなかった場合 nil を返します。
省略可能な第二引数 pos を指定すると......captures) # => ["b", "r"]
p(/(.).(.)/.match("foobar", -3).captures) # => ["b", "r"]
//}
pos を指定しても MatchData#offset 等の結果
には影響しません。つまり、
//emlist[][ruby]{
re.match(str[pos..-1])
//}
と
//emlist[][ruby]{
re.match(str, pos)
//}
は異なります。......os のデフォルト値は 0)。
//emlist[例][ruby]{
reg = Regexp.new("foo")
if reg.match("foobar")
puts "match"
end
# => match
p reg.match("foobar") # => #<MatchData:0x29403fc>
p reg.match("bar") # => nil
p /(foo)(bar)(baz)/.match("foobarbaz").to_a.values_at(1,2,3) # => ["foo", "bar", "b... -
Gem
:: Platform . match(platform) -> bool (21101.0) -
@todo ???
@todo ??? -
Scanf
:: FormatString # match(str) (21101.0) -
@todo
@todo -
Symbol
# match(other) -> Integer | nil (18231.0) -
正規表現 other とのマッチを行います。
...elf.to_s.match(other) と同じです。)
@param other 比較対象のシンボルを指定します。
@return マッチが成功すればマッチした位置を、そうでなければ nil を返します。
p :foo.match(/foo/) # => 0
p :foobar.match(/bar/) # => 3
p :foo.match(/bar/)......# => nil
@see String#match... -
Gem
:: GemPathSearcher # matching _ file?(spec , path) -> bool (15200.0) -
与えられた spec に path が含まれている場合、真を返します。 そうでない場合は偽を返します。
...与えられた spec に path が含まれている場合、真を返します。
そうでない場合は偽を返します。
@param spec Gem::Specification のインスタンスを指定します。
@param path 探索対象のパスを指定します。... -
Gem
:: GemPathSearcher # matching _ files(spec , path) -> [String] (15200.0) -
与えられた spec に path が含まれている場合、その path のリストを返します。
...与えられた spec に path が含まれている場合、その path のリストを返します。
@param spec Gem::Specification のインスタンスを指定します。
@param path 探索対象のパスを指定します。... -
Gem
:: SpecFetcher # find _ matching(dependency , all = false , matching _ platform = true) -> Array (12300.0) -
依存関係を満たす gemspec の名前の配列を返します。
...依存関係を満たす gemspec の名前の配列を返します。
@param dependency 依存関係を指定します。
@param all 真を指定するとマッチする全てのバージョンの情報を返します。
@param matching_platform 偽を指定すると全てのプラットフォー......ムの情報を返します。
@see Gem::Dependency...