Which of the following RegEx character sets does the '\w' meta-character most closely represent in Perl-compatible Regular Expression implementations?
- [a-zA-Z]
- [a-zA-Z0-9]
- [a-zA-Z_]
- [a-zA-Z0-9_]
EXPLANATION
The "word" meta-character \w in RegEx will match the full alpha-numeric range, basically the full alphabet as well as number characters, and includes underscores.
Note that it
matches more alphabet characters than the standard a through z: pretty
much any alphabet character, such as 'ñ', also match.
0 comments:
Post a Comment