PDA

View Full Version : Reading a line of text and searching for a word...


isaaclloyd
10-14-2005, 10:09 AM
What I am trying to figure out how to do is read through a line of something like this:


Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7


and search for certain words in that "string". For example, I want to know is there is a word "Windows" in there. If so then


WINPC = "true"


etc. etc. Any ideas or thoughts on any commands or ways to do something like this would greatly be appreciated. Thanks.

nikkiH
10-14-2005, 05:29 PM
Apply a regular expression against it.

glenngv
10-17-2005, 10:37 AM
Or use InStr (http://www.devguru.com/technologies/vbscript/13934.asp) method.