Multiple choice technology operating systems

regular expression to match any line starting with an "A*"

  1. ^A*

  2. ^A*

  3. ^AA*

  4. ^*

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The caret ^ anchors to the line's beginning. The asterisk must be escaped with backslash because it's a regex metacharacter meaning 'zero or more of the preceding element.' Without escaping, ^A* would match 'A', 'AA', 'AAA', etc.