IT Questions and Answers :)

Thursday, November 23, 2017

Which of the following RegEx character sets does the '\w' meta-character most closely represent in Perl-compatible Regular Expression implementations?

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_] 

 
Which of the following RegEx character sets does the '\w' meta-character most closely represent in Perl-compatible Regular Expression implementations?

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.

http://www.w3schools.com/jsref/jsref_regexp_wordchar.asp 
Share:

0 comments:

Post a Comment

Popular Posts