user784637
user784637

Reputation: 16152

Regex- Does case insensitivity only apply to letters (upper and lower case)?

(Sorry I know the question sounds ridiculous) and if so which of the following is preferred:

[a-zA-Z]
[a-z]i
[A-Z]i

Upvotes: 0

Views: 89

Answers (1)

BoltClock
BoltClock

Reputation: 724172

If the regex engine supports Unicode and the appropriate option is passed (e.g. in PCRE, the u modifier), then case insensitivity is also applied to Unicode character sequences where appropriate.

Upvotes: 1

Related Questions