Multiple choice technology operating systems

The regular expression that would match a 5 letter palindrome, (e.g. "radar"), would be

  1. \([a-z]\)\([a-z]\)[a-z]\2\1
  2. \([a-z]\)\([a-z]\)[a-z]\2\3
  3. \2\1\([a-z]\)\([a-z]\)[a-z]
  4. \([a-z]\)\([a-z]\)[0-9]\2\1
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This regex uses backreferences where ([a-z]) captures letters in groups 1 and 2. The pattern requires the fourth letter match group 2 (\2) and the fifth letter match group 1 (\1), creating palindrome symmetry around the middle character.