0

I want to search for a string which matches regex [A-Z]+(?:19|20)\d\d in a file in centos. I am using below command for the same:

grep -F '[A-Z]+(?:19|20)\d\d' <file_name>

It does not seem to work. I ended up escaping .^$*+?()[{\| but still no luck. I wanted to know if am incorrect somewhere, can anyone please help ?

Shankar Guru
  • 963
  • 1
  • 23
  • 42

0 Answers0