2124件ヒット
[1-100件を表示]
(0.145秒)
別のキーワード
ライブラリ
- ビルトイン (1206)
- abbrev (12)
- json (228)
-
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / rational (12) - logger (24)
- matrix (24)
-
net
/ http (12) - open-uri (12)
- optparse (36)
- pathname (48)
- rake (84)
-
rake
/ packagetask (12) -
rexml
/ document (144) -
ripper
/ lexer (16) -
rubygems
/ gem _ path _ searcher (12) -
rubygems
/ installer (12) -
rubygems
/ specification (24) - stringio (74)
- strscan (96)
- win32ole (12)
クラス
-
ARGF
. class (12) - Array (33)
- Binding (7)
- Class (12)
- Data (6)
- Date (12)
- DateTime (12)
- Dir (24)
- Enumerator (24)
- File (24)
-
File
:: Stat (24) - Float (24)
-
Gem
:: GemPathSearcher (12) -
Gem
:: Installer (12) -
Gem
:: Specification (24) - IO (6)
-
JSON
:: State (108) - Logger (24)
- MatchData (158)
- Matrix (24)
- Method (12)
- Module (216)
-
Net
:: HTTPGenericRequest (12) - Object (15)
- OptionParser (36)
- Pathname (48)
- Proc (12)
-
REXML
:: Attribute (36) -
REXML
:: Attributes (36) -
REXML
:: CData (24) -
REXML
:: DocType (12) -
REXML
:: Element (36) -
Rake
:: Application (36) -
Rake
:: FileList (36) -
Rake
:: InvocationChain (12) -
Rake
:: PackageTask (12) - Range (33)
- Rational (36)
-
Ripper
:: Lexer (16) -
RubyVM
:: InstructionSequence (34) - String (413)
- StringIO (74)
- StringScanner (96)
- Symbol (9)
-
Thread
:: Backtrace :: Location (72) - Time (12)
- TracePoint (12)
- UnboundMethod (12)
-
WIN32OLE
_ TYPELIB (12)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) -
OpenURI
:: Meta (12)
キーワード
- % (14)
- [] (60)
- abbrev (12)
-
absolute
_ path (24) -
add
_ element (12) -
array
_ nl (12) - attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) -
attribute
_ of (12) - autoload (12)
-
base
_ label (12) - binread (12)
- byteindex (3)
- byterindex (3)
- bytes (7)
- captures (12)
- concat (33)
-
const
_ source _ location (12) -
datetime
_ format (12) - deconstruct (2)
-
deprecate
_ constant (12) - dev (12)
- each (12)
-
each
_ byte (24) -
each
_ char (12) -
each
_ codepoint (12) -
each
_ grapheme _ cluster (8) -
each
_ line (24) -
formatted
_ program _ filename (12) - formatter (12)
- ftype (12)
- gsub (48)
- gsub! (60)
- indent (12)
- indent= (12)
- index (12)
- inspect (63)
-
json
_ creatable? (12) - label (12)
- lex (8)
-
lib
_ dirs _ for (12) - lines (7)
- match (24)
- match? (30)
- matched (12)
- matched? (12)
-
matched
_ size (12) - name (12)
- names (12)
- namespace (12)
- namespaces (12)
-
object
_ nl (12) -
object
_ nl= (12) - on (36)
-
original
_ dir (12) - pack (21)
-
package
_ dir _ path (12) - parse (8)
- path (99)
- pathmap (12)
-
post
_ match (24) -
pre
_ match (24) - prefix (12)
- prefixes (12)
- printf (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) - rakefile (12)
-
remove
_ const (12) - rindex (12)
-
rubygems
_ version (12) - scan (24)
-
source
_ location (43) - space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - status (12)
- step (19)
- strftime (12)
- sub (60)
- sub! (48)
- terminate (12)
- text (12)
- then (7)
-
to
_ a (12) -
to
_ binary (10) -
to
_ f (12) -
to
_ json (144) -
to
_ path (27) -
to
_ r (12) -
to
_ ruby (12) -
to
_ s (99) -
to
_ string (12) - tr (12)
-
tr
_ s (12) -
tr
_ s! (12) - truncate (12)
- unpack (12)
- unpack1 (9)
- value (12)
-
values
_ at (12) -
with
_ object (24) - xpath (12)
-
yield
_ self (8)
検索結果
先頭5件
-
MatchData
# string -> String (30415.0) -
マッチ対象になった文字列の複製を返します。
...マッチ対象になった文字列の複製を返します。
返す文字列はフリーズ(Object#freeze)されています。
//emlist[例][ruby]{
m = /(.)(.)(\d+)(\d)/.match("THX1138.")
m.string # => "THX1138."
//}... -
String
# match(regexp , pos = 0) -> MatchData | nil (21519.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... -
JSON
:: Generator :: GeneratorMethods :: Float # to _ json(state _ or _ hash = nil) -> String (21308.0) -
自身から生成した JSON 形式の文字列を返します。
...state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
(1.0).to... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (21308.0) -
自身から生成した JSON 形式の文字列を返します。
...ドは UTF-8 であるべきです。
"\u????" のように UTF-16 ビッグエンディアンでエンコードされた文字列を返すことがあります。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のイ......JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
puts "test".to_json # => "test"
puts '"'.to_json # => "\""
puts "\\".to_json # => "\\"
puts "𤘩宮城".to_json(a......scii_only: true) # => "\ud851\ude29\u5bae\u57ce"
//}... -
MatchData
# post _ match -> String (21308.0) -
マッチした部分より後ろの文字列を返します($'と同じ)。
...マッチした部分より後ろの文字列を返します($'と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.post_match # => "baz"
//}
@see MatchData#pre_match... -
MatchData
# pre _ match -> String (21308.0) -
マッチした部分より前の文字列を返します($`と同じ)。
...マッチした部分より前の文字列を返します($`と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.pre_match # => "foo"
//}
@see MatchData#post_match... -
String
# match?(regexp , pos = 0) -> bool (21225.0) -
regexp.match?(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match? を参照してください。
...regexp.match?(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match? を参照してください。
//emlist[例][ruby]{
"Ruby".match?(/R.../) #=> true
"Ruby".match?(/R.../, 1) #=> false
"Ruby".match?(/P.../) #=>......false
$& #=> nil
//}
@see Regexp#match?, Symbol#match?... -
String
# match(regexp , pos = 0) {|m| . . . } -> object (21219.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
# tr(pattern , replace) -> String (18438.0) -
pattern 文字列に含まれる文字を検索し、 それを replace 文字列の対応する文字に置き換えます。
...pattern 文字列に含まれる文字を検索し、
それを replace 文字列の対応する文字に置き換えます。
pattern の形式は tr(1) と同じです。つまり、
`a-c' は a から c を意味し、"^0-9" のように
文字列の先頭が `^' の場合は指定文字以外......囲が pattern の範囲よりも小さい場合は、
replace の最後の文字が無限に続くものとして扱われます。
@param pattern 置き換える文字のパターン
@param replace pattern で指定した文字を置き換える文字
//emlist[例][ruby]{
p "foo".tr("f", "......oo"
p "foo".tr('a-z', 'A-Z') # => "FOO"
p "FOO".tr('A-Z', 'a-z') # => "foo"
# シーザー暗号の復号
p "ORYV".tr("A-Z", "D-ZA-C") # => "RUBY"
# 全角英数字といくつかの記号の半角化
email = "ruby−lang@example.com"
p email.tr("0-9...