Regular Expressions
- groupCount reports a total number of Capturing groups.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
groupCount reports total number of Capturing groups. this does not include special group, group 0.
- Which capturing group can represent the entire expression?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Group 0 is a special group which represents the entire expression.
- Object of which class is used to compile regular expression?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
object of Pattern class can represent compiled regular expression.
- What is the significance of Matcher class for regular expression in java?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
macther() method is invoked using matcher object which interpretes pattern and performs match operations in the input string.
- Which of the following is not a class of java.util.regex?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
java.util.regex consists 3 classes. PatternSyntaxException indicates syntax error in regex.