Which of the following regular expressions will match the strings “cat” and…

PYQ IBPS SO CRP SPL-XV (2025)

Which of the following regular expressions will match the strings “cat” and “bat”, but not “at”?

  1. A.

    ^.[cb]at$

  2. B.

    [cat|bat]

  3. C.

    ^at$

  4. D.

    ^[cb]at$

  5. E.

    .*at$

Attempted by 24 students.

Sign up free to check your answer

Sign up free

Explore the full course: Ibps So It Mains

Loading lesson…