Answer the following statements true (T) or false (F)

1) Metacharacter ? matches exactly one occurrence of the expression it follows.
2) Method group returns an SRE_Match object.
3) Method re.match does not search through a string, but returns a match object only if the string matches the specified regular expression starting from the beginning.
4) The class [^0–9] matches any digit but 0.
5) Preceding a string with the character r creates a raw string.

1) F
2) F
3) T
4) F
5) T

Computer Science & Information Technology

You might also like to view...

Which of the following tabs should you click to verify that the margins and page size are correct?

A. VIEW B. DESIGN C. PAGE LAYOUT D. REVIEW

Computer Science & Information Technology

The getValue() method is overridden in two ways. Which one is correct?

``` I: public class Test { public static void main(String[] args) { A a = new A(); System.out.println(a.getValue()); } } class B { public String getValue() { return "Any object"; } } class A extends B { public Object getValue() { return "A string"; } } II: public class Test { public static void main(String[] args) { A a = new A(); System.out.println(a.getValue()); } } class B { public Object getValue() { return "Any object"; } } class A extends B { public String getValue() { return "A string"; } } ``` a. I b. II c. Both I and II d. Neither

Computer Science & Information Technology