ライブラリ
- English (55)
- ビルトイン (617)
- csv (11)
-
irb
/ cmd / help (11) -
minitest
/ unit (1) -
net
/ telnet (8) - openssl (33)
- optparse (22)
- rake (11)
-
rdoc
/ context (11) -
rdoc
/ parser (11) -
rexml
/ document (33) -
ripper
/ lexer (11) -
rubygems
/ gem _ path _ searcher (22) -
rubygems
/ spec _ fetcher (22) - strscan (154)
クラス
- CSV (11)
- File (22)
-
Gem
:: GemPathSearcher (22) -
Gem
:: SpecFetcher (22) -
IRB
:: ExtendCommand :: Help (11) - MatchData (224)
-
Net
:: Telnet (8) - Object (11)
- OptionParser (22)
-
RDoc
:: Context (11) -
RDoc
:: Parser (11) -
REXML
:: Elements (11) -
REXML
:: Entity (11) -
REXML
:: XPath (11) - Regexp (77)
- Ripper (11)
- String (74)
- StringScanner (154)
- Symbol (11)
モジュール
-
File
:: Constants (11) - Kernel (242)
-
MiniTest
:: Assertions (1) -
OpenSSL
:: X509 (33) -
Rake
:: TaskManager (11)
キーワード
-
$ & (11) -
$ & # 39; (11) -
$ 1 (11) -
$ 10 (11) -
$ 11 (11) -
$ 2 (11) -
$ 3 (11) -
$ 4 (11) -
$ 5 (11) -
$ 6 (11) -
$ 7 (11) -
$ 8 (11) -
$ 9 (11) -
$ LAST _ MATCH _ INFO (11) -
$ LAST _ PAREN _ MATCH (11) -
$ MATCH (11) -
$ POSTMATCH (11) -
$ PREMATCH (11) -
$ ` (11) -
$ ~ (11) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - << (11)
- =~ (11)
- DateTimeMatcher (11)
-
FNM
_ DOTMATCH (11) -
NEWS for Ruby 3
. 0 . 0 (4) -
SCRIPT
_ LINES _ _ (11) -
V
_ ERR _ AKID _ ISSUER _ SERIAL _ MISMATCH (11) -
V
_ ERR _ AKID _ SKID _ MISMATCH (11) -
V
_ ERR _ SUBJECT _ ISSUER _ MISMATCH (11) - [] (44)
- accept (22)
-
assert
_ match (1) - begin (11)
- byteoffset (4)
- captures (11)
-
check
_ until (11) - cmd (4)
- compile (11)
- concat (11)
- end (11)
-
enhance
_ with _ matching _ rule (11) - execute (11)
- fetch (11)
-
find
_ matching (11) - fnmatch (11)
- fnmatch? (11)
- gsub (22)
- gsub! (11)
- hash (11)
- inspect (11)
- irb (11)
-
last
_ match (11) - length (11)
- match? (19)
- matched (11)
- matched? (11)
-
matched
_ size (11) - matchedsize (11)
- matches? (11)
-
matching
_ file? (11) -
matching
_ files (11) - names (11)
- new (11)
- offset (22)
-
parse
_ files _ matching (11) -
post
_ match (22) -
pre
_ match (22) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
rubygems
/ commands / install _ command (11) -
rubygems
/ commands / pristine _ command (11) -
scan
_ full (11) -
scan
_ until (11) - size (11)
-
skip
_ until (11) - string (11)
- sub (22)
- sub! (11)
-
to
_ a (22) -
to
_ s (11) -
token
_ match (11) -
unmatched
_ alias _ lists (11) - unscan (11)
-
values
_ at (11) - waitfor (4)
- ~ (11)
- 正規表現 (11)
検索結果
先頭5件
-
irb (26342.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロン......す。
readline ライブラリがインストールされている時には
自動的にコマンドライン編集や履歴の機能が使えるようになります。
=== irb のコマンドラインオプション
irb [options] file_name opts
options:
-f ~/.irbrc を読......を指定した場合は単純に require さ
れます。
: help(*names)
: irb_help(*names)
RI から Ruby のドキュメントを参照します。
//emlist{
irb(main):001:0> help String#match
...
//}
names を指定しなかった場合は、RI を対話的なモードで起動し... -
String
# match(regexp , pos = 0) -> MatchData | nil (21512.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('(.)\1......"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('(.)\1......"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... -
Gem
:: SpecFetcher # find _ matching(dependency , all = false , matching _ platform = true) -> Array (18600.0) -
依存関係を満たす gemspec の名前の配列を返します。
...返します。
@param dependency 依存関係を指定します。
@param all 真を指定するとマッチする全てのバージョンの情報を返します。
@param matching_platform 偽を指定すると全てのプラットフォームの情報を返します。
@see Gem::Dependency... -
Regexp
# match(str , pos = 0) -> MatchData | nil (18510.0) -
指定された文字列 str に対して位置 pos から自身が表す正規表現によるマッ チングを行います。マッチした場合には結果を MatchData オブジェクトで返し ます。 マッチしなかった場合 nil を返します。
...には結果を MatchData オブジェクトで返し
ます。
マッチしなかった場合 nil を返します。
省略可能な第二引数 pos を指定すると、マッチの開始位置を pos から行
うよう制御できます(pos のデフォルト値は 0)。
//emlist[例][ruby]{
p......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)
//}
は異なります。......チした場合に限り MatchData オブジェクトがブロック引数に渡されて実行されます。
マッチした場合はブロックの値を返し、マッチしなかった場合は nil を返します。
//emlist[例][ruby]{
results = []
/((.)\2)/.match("foo") {|m| results << m[0]... -
Symbol
# match(other) -> MatchData | nil (18437.0) -
正規表現 other とのマッチを行います。
....match(other) と同じです。)
@param other 比較対象のシンボルを指定します。
@return マッチが成功すれば MatchData オブジェクトを、そうでなければ nil を返します。
p :foo.match(/foo/) # => #<MatchData "foo">
p :foobar.match(/bar/) # => #<Match......Data "bar">
p :foo.match(/bar/) # => nil
@see String#match
@see Symbol#match?... -
Regexp
# match(str , pos = 0) {|m| . . . } -> object | nil (18410.0) -
指定された文字列 str に対して位置 pos から自身が表す正規表現によるマッ チングを行います。マッチした場合には結果を MatchData オブジェクトで返し ます。 マッチしなかった場合 nil を返します。
...には結果を MatchData オブジェクトで返し
ます。
マッチしなかった場合 nil を返します。
省略可能な第二引数 pos を指定すると、マッチの開始位置を pos から行
うよう制御できます(pos のデフォルト値は 0)。
//emlist[例][ruby]{
p......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)
//}
は異なります。......チした場合に限り MatchData オブジェクトがブロック引数に渡されて実行されます。
マッチした場合はブロックの値を返し、マッチしなかった場合は nil を返します。
//emlist[例][ruby]{
results = []
/((.)\2)/.match("foo") {|m| results << m[0]... -
OpenSSL
:: X509 :: V _ ERR _ AKID _ SKID _ MISMATCH -> Integer (18400.0) -
証明書の authorityKeyIdentifier 拡張領域の内容が issuer(発行者)の証明書の subjectKeyIdentifier の内容と 食い違っていることを意味します。
...証明書の authorityKeyIdentifier 拡張領域の内容が
issuer(発行者)の証明書の subjectKeyIdentifier の内容と
食い違っていることを意味します。... -
OpenSSL
:: X509 :: V _ ERR _ SUBJECT _ ISSUER _ MISMATCH -> Integer (18400.0) -
証明書の issuer(発行者)名と上位の証明書のsubject(所有者)名が 異なっていることを意味します。
...証明書の issuer(発行者)名と上位の証明書のsubject(所有者)名が
異なっていることを意味します。... -
Symbol
# match(other) -> Integer | nil (18331.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... -
REXML
:: XPath . match(element , path = nil , namespaces = {} , variables = {}) -> [Node] (18307.0) -
element の path で指定した XPath 文字列にマッチするノードの配列を 返します。
...。
path を省略すると "*" を指定したことになります。
namespace で名前空間の対応付けを Hash で指定します。
variable で XPath 内の変数に対応する値を指定できます。
XPathインジェクション攻撃を避けるため、適切な
エスケープ......の対応付け
@param variables 変数名とその値の対応付け
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:x='1'>
<a>
<b>b1</b>
<x:c />
<b>b2</b>
<d />
</a>
<b> b3 </b>
</root>
EOS
REXML::XPath.match(doc, "/root/a/b") # => [<...