るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
8件ヒット [1-8件を表示] (0.076秒)

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub!

ライブラリ

クラス

モジュール

キーワード

検索結果

Regexp.escape(string) -> String (55744.0)

string の中で正規表現において特別な意味を持つ文字の直前にエ スケープ文字(バックスラッシュ)を挿入した文字列を返します。

string の中で正規表現において特別な意味を持つ文字の直前にエ
スケープ文字(バックスラッシュ)を挿入した文字列を返します。

@param string 正規表現において特別な意味をもつ文字をもつ文字列を指定します。

//emlist[例][ruby]{
rp = Regexp.escape("$bc^")
p rp # => "\\$bc\\^"
//}

WEBrick::HTTPUtils.#escape(str) -> String (54946.0)

与えられた文字列を数値参照文字列に変換します。

与えられた文字列を数値参照文字列に変換します。

以下の正規表現を使用して変換します。

control = (0x0..0x1f).collect{|c| c.chr }.join + "\x7f"
space = " "
delims = '<>#%"'
unwise = '{}|\\^[]`'
nonascii = (0x80..0xff).collect{|c| c.chr }.join
/[#{Regexp.escape(control + space + delims + unwise + nonascii)}]/n

@param str...

正規表現 (46276.0)

正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references

正規表現
* metachar
* expansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references


正規表現(regular expression)は文字列のパタ...

URI.escape(str, unsafe = URI::UNSAFE) -> String (46006.0)

URI 文字列をエンコードした文字列を返します。

URI 文字列をエンコードした文字列を返します。

このメソッドは obsolete です。

代わりに
ERB::Util.#url_encode,
CGI.escape,
URI.encode_www_form_component,
WEBrick::HTTPUtils.#escape_form,
WEBrick::HTTPUtils.#escape
などの使用を検討してください。
詳細は 29293 からのスレッドを参照してください。

例:
require 'uri'
p URI.escape('http://images.google.co.jp/images?q=モナリザ...

WEBrick::HTTPUtils.#escape_path(str) -> String (18946.0)

与えられた文字列を数値参照文字列に変換します。

与えられた文字列を数値参照文字列に変換します。

以下の正規表現を使用して変換します。

num = '0123456789'
lowalpha = 'abcdefghijklmnopqrstuvwxyz'
upalpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
mark = '-_.!~*\'()'
unreserved = num + lowalpha + upalpha + mark
/[^#{Regexp.escape(unreserved + ":@&=+$,")}]/n

@param str 文字列を指定します。...

絞り込み条件を変える

Regexp.quote(string) -> String (10444.0)

string の中で正規表現において特別な意味を持つ文字の直前にエ スケープ文字(バックスラッシュ)を挿入した文字列を返します。

string の中で正規表現において特別な意味を持つ文字の直前にエ
スケープ文字(バックスラッシュ)を挿入した文字列を返します。

@param string 正規表現において特別な意味をもつ文字をもつ文字列を指定します。

//emlist[例][ruby]{
rp = Regexp.escape("$bc^")
p rp # => "\\$bc\\^"
//}

URI.encode(str, unsafe = URI::UNSAFE) -> String (706.0)

URI 文字列をエンコードした文字列を返します。

URI 文字列をエンコードした文字列を返します。

このメソッドは obsolete です。

代わりに
ERB::Util.#url_encode,
CGI.escape,
URI.encode_www_form_component,
WEBrick::HTTPUtils.#escape_form,
WEBrick::HTTPUtils.#escape
などの使用を検討してください。
詳細は 29293 からのスレッドを参照してください。

例:
require 'uri'
p URI.escape('http://images.google.co.jp/images?q=モナリザ...

ruby 1.8.3 feature (325.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

ruby 1.8.3 feature
*((<ruby 1.8 feature>))
*((<ruby 1.8.2 feature>))

ruby 1.8.2 から ruby 1.8.3 までの変更点です。

掲載方針

*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。

以下は各変更点に付けるべきタグです。

記号について(特に重要なものは大文字(主観))

* カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ...