Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get Regex end-of-string($) to work

Status
Not open for further replies.

alexjones

Programmer
Jul 27, 2001
132
US
I'm trying to develop a regular expression which will pick up the file names in a unix-based directory listing, e.g.,

-rw-rw-r-- 1 root root 116 Jan 19 08:02 file1.txt
-rw-rw-r-- 1 root root 9876 Jan 21 11:15 file2.txt

I tried setting the multiline option to true and using the following expression:

file\d\.txt$

It didn't find any matches. Am I missing something here?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top