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!

Find string in text file and select additional characters

Status
Not open for further replies.

probe92

Technical User
Jul 5, 2009
1
I would like to search a text file for a specific word and then select the next three characters to store into a variable using vbscript. The text file contains the value "Delay=60". The script must search for "Delay=" and store the value "60" in a variable. The reason i need to store the characters after the = sign is because they will always be different.

Any ideas?
 
Hmm, there are quite a few ways to do this. I'd personally use regular expressions.

What have you tried so far?

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top