Notice: Constant SAVEQUERIES already defined in /home/uwsc/domains/uwsc.jp/public_html/wp-config.php on line 125

Notice: 関数 wp_add_inline_script が誤って呼び出されました。<script> タグを wp_add_inline_script() に渡さないでください。 詳しくは WordPress のデバッグをご覧ください。 (このメッセージはバージョン 4.5.0 で追加されました) in /home/uwsc/domains/uwsc.jp/public_html/wp-includes/functions.php on line 5905

Notice: Undefined variable: post in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 147

Notice: Undefined variable: post in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 154

Notice: Trying to get property 'ID' of non-object in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 154

Notice: Undefined index: description in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 200

Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 200
RegExp.IgnoreCase プロパティ | UWSC辞典


Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 27

Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 31
RegExp.IgnoreCase プロパティ

本ページには広告が含まれています。


Notice: Undefined offset: 1 in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 188

Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 13

Warning: in_array() expects parameter 2 to be array, string given in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 41

Notice: Undefined index: delimiter in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 47

正規表現の検索時に大文字・小文字を区別するかどうかを示すブール値を指定します。このプロパティがTrueに指定されている場合、大文字と小文字を区別しません。

構文
  1. RegExp.IgnoreCase = Boolean
引数
戻り値

使い方

RegExp.Pattern プロパティ^[a-z]+$を指定しているのでRegExp.IgnoreCase プロパティFalseを指定、もしくは省略した場合はアルファベットの小文字だけで構成された文字列にマッチしますが、Trueを指定した場合は大文字と小文字を区別しません。RegExp.Test メソッドは正規表現にマッチした場合にTrue、マッチしない場合にFalseを返すメソッドです。

UWSC
DIM RegExp = CREATEOLEOBJ("VBScript.RegExp")

DIM array[] = "ABC", "abc", "Abc"

WITH RegExp
	.Pattern = "^[a-z]+$"
	.Global = TRUE

	.IgnoreCase = FALSE
	PRINT "■IgnoreCase = FALSE"
	FOR item IN array
		PRINT item + "," + .Test(item)
	NEXT

	.IgnoreCase = TRUE
	PRINT "■IgnoreCase = TRUE"
	FOR item IN array
		PRINT item + "," + .Test(item)
	NEXT
ENDWITH
結果
CSV
■IgnoreCase = FALSE
ABC,                   False
abc,                   True
Abc,                   False
■IgnoreCase = TRUE
ABC,                   True
abc,                   True
Abc,                   True