Hi guys,
Maybe I misunderstood the below question. Could you please give me your opinions.
What are true about
Java Regex ? (Choose all that apply)
a) The \w metacharacter searches for whitespaces.
b) The \b metacharacter searches for numeric digits.
c) The . metacharacter searches for alphabetic characters.
d) The
String [af] searches for a,b,c,d,e or f characters.
In my first attempt I chose B and C but according to MasterExam explanation the correct answer is only B.
The explanation for C as incorrect is because . metacharacter searches for any character.
I personally don't agree with this explanation. I think option C would be incorrect if it was stated in this way :
c) The . metacharacter searches
only for alphabetic characters.
I'm really interested about your comments.
Thanks.