1. Two questions...

I am trying to write a program for a sort of remote access type thing, and was
wondering if there was some way to create a program that will look for
charactars in a specific window. The second question is if I get a seqence of
charactars from a file, how can I check for a certain pattern, such as a word
in the sequence. Thanks to anyone who can help!!!

new topic     » topic index » view message » categorize

2. Re: Two questions...

ThatNerd at AOL.COM wrote:
>
The second question is if I get a seqence of
charactars from a file, how can I check for a certain pattern, such as a
word in the sequence. Thanks to anyone who can help!!!

Match works for that sort of thing:
atom location
sequence msg
msg = "Hello World!"
location = match("Wor",msg)

location will be 7 here (or zero if "Wor" is not part of the string)
Case counts, so you may want to convert both the test string and the
search string to upper case first.
Look at the docs for "wildcard_match" also, you can search for
patterns using * and ? when appropriate.

Regards,

Irv
visit my Euphoria Programming Archives
http://www.mindspring.com/~mountains

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu