In a regular expression, what does the metacharacter `$` represent when used at the end of a pattern?
A. The start of a line
B. Any character
C. The end of a line
D. A digit
Answer: Option C
A. The start of a line
B. Any character
C. The end of a line
D. A digit
Answer: Option C
What is a regular expression in Java?
A. A pattern that describes a set of strings
B. A Java class for reading regular expressions
C. A Java method for creating strings
D. A Java package for file operations
Which class is used to compile a regular expression in Java?
A. `String`
B. `Regex`
C. `Matcher`
D. `Pattern`
In a regular expression, what does the metacharacter `.` represent?
A. A digit
B. A space
C. Any character
D. A word
What does the character class `[A-Za-z]` match in a regular expression?
A. Any special character
B. Any uppercase or lowercase letter
C. Any whitespace character
D. None of These
Join The Discussion