165件ヒット
[1-100件を表示]
(0.112秒)
モジュール
- Kernel (165)
キーワード
-
$ ARGV (11) -
$ ERROR _ POSITION (11) -
$ FIELD _ SEPARATOR (11) -
$ FS (11) -
$ INPUT _ RECORD _ SEPARATOR (11) -
$ LAST _ PAREN _ MATCH (11) -
$ LAST _ READ _ LINE (11) -
$ MATCH (11) -
$ OFS (11) -
$ ORS (11) -
$ OUTPUT _ FIELD _ SEPARATOR (11) -
$ OUTPUT _ RECORD _ SEPARATOR (11) -
$ POSTMATCH (11) -
$ PREMATCH (11) -
$ RS (11)
検索結果
先頭5件
-
Kernel
$ $ LAST _ PAREN _ MATCH -> String | nil (215.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>ikko......u</td> <td><a href=http://localhost/link.html>link</a></td> </tr>
#enf of sample.rb
$ ruby sample.rb
"http://localhost/a.jpg"
"link"... -
Kernel
$ $ FIELD _ SEPARATOR -> String | nil (204.0) -
$; の別名
...$; の別名
require "English"
str = "hoge,fuga,ugo,bar,foo"
p str.split #=> ["hoge,fuga,ugo,bar,foo"]
$FIELD_SEPARATOR = ","
p str.split #=> ["hoge", "fuga", "ugo", "bar", "foo"]... -
Kernel
$ $ FS -> String | nil (204.0) -
$; の別名
...$; の別名
require "English"
str = "hoge,fuga,ugo,bar,foo"
p str.split #=> ["hoge,fuga,ugo,bar,foo"]
$FIELD_SEPARATOR = ","
p str.split #=> ["hoge", "fuga", "ugo", "bar", "foo"]... -
Kernel
$ $ INPUT _ RECORD _ SEPARATOR -> String | nil (204.0) -
$/ の別名
...$/ の別名
require "English"
$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]
__END__
ugo|ego|fogo... -
Kernel
$ $ OFS -> String | nil (204.0) -
$, の別名
...$, の別名
require "English"
array = %w|hoge fuga ugo bar foo|
p array.join #=> "hogefugaugobarfoo"
$OUTPUT_FIELD_SEPARATOR = ","
p array.join #=> "hoge,fuga,ugo,bar,foo"... -
Kernel
$ $ ORS -> String | nil (204.0) -
$\ の別名
...$\ の別名
require "English"
print "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
print "fuge"
print "ugo"
# end of sample.rb
ruby sample.rb
hoge
huga
fuge
ugo... -
Kernel
$ $ OUTPUT _ FIELD _ SEPARATOR -> String | nil (204.0) -
$, の別名
...$, の別名
require "English"
array = %w|hoge fuga ugo bar foo|
p array.join #=> "hogefugaugobarfoo"
$OUTPUT_FIELD_SEPARATOR = ","
p array.join #=> "hoge,fuga,ugo,bar,foo"... -
Kernel
$ $ OUTPUT _ RECORD _ SEPARATOR -> String | nil (204.0) -
$\ の別名
...$\ の別名
require "English"
print "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
print "fuge"
print "ugo"
# end of sample.rb
ruby sample.rb
hoge
huga
fuge
ugo... -
Kernel
$ $ RS -> String | nil (204.0) -
$/ の別名
...$/ の別名
require "English"
$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]
__END__
ugo|ego|fogo... -
Kernel
$ $ ARGV -> [String] (203.0) -
$* の別名
...$* の別名
require "English"
p $ARGV
# end of sample.rb
ruby sample.rb 31 /home/hoge/fuga.txt
#=> ["31", "/home/hoge/fuga.txt"]...