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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding patterns

Status
Not open for further replies.

siswjh

MIS
Dec 6, 2001
63
US
I would like to write a script that searches for a pattern in a line.

The line will look something like this:

Index Filename CreationDateCreationTime Bytes Download
1 samename.001 Y
2 samename.002 N

I want to search the lines and where the Download header is if it has a N I want to download that file. But I am not sure how to get the search right as far as the numbers after the file name in otherwords .001 or .002 so on and so forth. I think but am not sure that I can do it like this:
Code:
if /samename\.\d(3) && N$/;
am I on the right track or am I driving around in circles.

Thanks for any help
Jesse
 
Try

/samename\.\d(3).*N$/

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top