60件ヒット
[1-60件を表示]
(0.020秒)
種類
- インスタンスメソッド (24)
- 定数 (24)
- 文書 (12)
ライブラリ
- ビルトイン (48)
クラス
- Regexp (48)
キーワード
- FIXEDENCODING (12)
- NOENCODING (12)
-
fixed
_ encoding? (12) - 正規表現 (12)
検索結果
先頭5件
-
Regexp
# encoding -> Encoding (30230.0) -
正規表現オブジェクトのエンコーディングを表す Encoding オブジェクト を返します。
...正規表現オブジェクトのエンコーディングを表す Encoding オブジェクト
を返します。
@see d:spec/regexp#encoding... -
Regexp
# fixed _ encoding? -> bool (18203.0) -
正規表現が任意の ASCII 互換エンコーディングとマッチ可能な時に false を返します。
...*-
r = /a/
r.fixed_encoding? # => false
r.encoding # => #<Encoding:US-ASCII>
r =~ "\u{6666} a" # => 2
r =~ "\xa1\xa2 a".force_encoding("euc-jp") # => 2
r =~ "abc".force_encoding("euc-jp")......_encoding? # => true
r.encoding # => #<Encoding:UTF-8>
r =~ "\u{6666} a" # => 2
begin
r =~ "\xa1\xa2".force_encoding("euc-jp")
rescue => e
e.class # => Encoding:......"abc".force_encoding("euc-jp") # => 0
r = /\u{6666}/
r.fixed_encoding? # => true
r.encoding # => #<Encoding:UTF-8>
r =~ "\u{6666} a" # => 0
begin
r =~ "\xa1\xa2".force_encoding("euc-jp")
r... -
Regexp
:: FIXEDENCODING -> Integer (18112.0) -
正規表現が特定のエンコーディングの文字列にしかマッチしないことを意味します。
...正規表現が特定のエンコーディングの文字列にしかマッチしないことを意味します。
@see Regexp#fixed_encoding?... -
Regexp
:: NOENCODING -> Integer (18100.0) -
正規表現のマッチ時に文字列のエンコーディングを無視し、 バイト列としてマッチすることを意味します。
正規表現のマッチ時に文字列のエンコーディングを無視し、
バイト列としてマッチすることを意味します。
正規表現リテラルの n オプションに対応します。 -
正規表現 (6262.0)
-
正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references
...pansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references
正規表現(regular expression)は文字列のパター......文字列中のどの場所であるかを知ることができます。
//emlist[][ruby]{
/pat/
%r{pat}
//}
などの正規表現リテラルや Regexp.new などで正規表現
オブジェクトを得ることができます。
===[a:metachar] メタ文字列とリテラル、メタ文字と......er}/.match("43+291")
# => #<MatchData "43+291" 1:"43" 2:"+" 3:"291">
//}
埋め込む文字列をリテラルとして認識させたい場合は Regexp.quote を
使います。
===[a:char] 文字
正規表現内では、「\」の後に文字列を置くことで、
ある特定の文字を表...