クラス
- CGI (4)
キーワード
- encode (1)
- u (1)
- unescape (2)
- unescapeElement (1)
-
unescape
_ element (1) -
url
_ encode (1) - 正規表現 (1)
検索結果
先頭5件
-
CGI
. escape(string) -> String (55072.0) -
与えられた文字列を URL エンコードした文字列を新しく作成し返します。
与えられた文字列を URL エンコードした文字列を新しく作成し返します。
@param string URL エンコードしたい文字列を指定します。
例:
require "cgi"
p CGI.escape('@##') #=> "%40%23%23"
url = "http://www.example.com/register?url=" +
CGI.escape('http://www.example.com/index.rss')
p url
#=> "http://www... -
URI
. escape(str , unsafe = URI :: UNSAFE) -> String (45808.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=モナリザ... -
CGI
. unescape(string) -> String (19033.0) -
与えられた文字列を URL デコードした文字列を新しく作成し返します。
与えられた文字列を URL デコードした文字列を新しく作成し返します。
@param string URL エンコードされている文字列を指定します。
require "cgi"
p CGI.unescape('%40%23%23') #=> "@##"
p CGI.unescape("http%3A%2F%2Fwww.example.com%2Findex.rss")
#=> "http://www.example.com/index.rss" -
CGI
. unescapeElement(string , *elements) -> String (18949.0) -
特定の要素だけをHTMLエスケープから戻す。
特定の要素だけをHTMLエスケープから戻す。
@param string 文字列を指定します。
@param elements HTML タグの名前を一つ以上指定します。文字列の配列で指定することも出来ます。
例:
require "cgi"
print CGI.unescapeElement('<BR><A HREF="url"></A>', "A", "IMG")
# => "<BR><A HREF="url"></A>"
print CGI.unescapeEl... -
CGI
. unescape _ element(string , *elements) -> String (18949.0) -
特定の要素だけをHTMLエスケープから戻す。
特定の要素だけをHTMLエスケープから戻す。
@param string 文字列を指定します。
@param elements HTML タグの名前を一つ以上指定します。文字列の配列で指定することも出来ます。
例:
require "cgi"
print CGI.unescapeElement('<BR><A HREF="url"></A>', "A", "IMG")
# => "<BR><A HREF="url"></A>"
print CGI.unescapeEl... -
URI
. unescape(str) -> String (9733.0) -
URI 文字列をデコードした文字列を返します。
URI 文字列をデコードした文字列を返します。
このメソッドは obsolete です。
代わりに
CGI.unescape,
URI.decode_www_form,
URI.decode_www_form_component
などの使用を検討してください。
例:
require 'uri'
puts URI.unescape('http://images.google.co.jp/images?q=%A5%E2%A5%CA%A5%EA%A5%B6&ie=EUC-JP')
#=> "http://images.google.co.jp/images?q=モナリザ&ie=... -
URI
. encode(str , unsafe = URI :: UNSAFE) -> String (508.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=モナリザ... -
ERB
:: Util . # u(s) -> String (469.0) -
文字列 s を URLエンコードした文字列を返します。
文字列 s を URLエンコードした文字列を返します。
文字列 s 中に含まれる 2バイト文字や半角スペースについて URL エンコードを行った文字列を返します(CGI.escapeとほぼ同じです)。
@param s URLエンコードを行う文字列
//emlist[例][ruby]{
require "erb"
include ERB::Util
puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
# Programming%20Ruby%3A%20%20The%20Pragmatic%20P... -
ERB
:: Util . # url _ encode(s) -> String (469.0) -
文字列 s を URLエンコードした文字列を返します。
文字列 s を URLエンコードした文字列を返します。
文字列 s 中に含まれる 2バイト文字や半角スペースについて URL エンコードを行った文字列を返します(CGI.escapeとほぼ同じです)。
@param s URLエンコードを行う文字列
//emlist[例][ruby]{
require "erb"
include ERB::Util
puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
# Programming%20Ruby%3A%20%20The%20Pragmatic%20P... -
正規表現 (193.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)は文字列のパタ...