Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

Suppose In a text file it contains following two lines.

20100811_23.15.17.151_Letters_abc.zip xxxx bytes

Time Now is 10/2/2011 9:30 AM

Now How to read that file name and dateTime part from text file ?

Please help.

Thanks,
Prasant
Posted
Updated 16-Feb-11 18:28pm
v2

Assuming your actual file is larger and more complex, the best approach would be to use regular expressions.

If it's just a simple 2 line file and you are not familiar with regular expressions, you could search for "<b>" and use some basic string manipulation to extract the text in between.
 
Share this answer
 
v2
Comments
JF2015 17-Feb-11 1:52am    
Good advice. 5+
Hope this[^]might help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900