0

characters mean in below unix regexp ?

ls -tr | grep "[a-zA-z0-9]\..*[.csv|.txt|.zip]$"

Im new to Unix and please explain the above exp and suggest link for learning unix regexp

Maroun
  • 94,125
  • 30
  • 188
  • 241
Devoloper250
  • 753
  • 2
  • 8
  • 12

1 Answers1

0

In regex, . matches any character. If you want to match the actual dot, you need to escape it.

\. match the character ., so the whole regex matches files that has the extension csv, txt or zip.

Maroun
  • 94,125
  • 30
  • 188
  • 241