Shoutbox

[help] Matching - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [help] Matching (/showthread.php?tid=66958)

[help] Matching by Deco on 10-04-2006 at 03:09 PM

Hi anyone point me to a document that gives good examples of the MATCH function?

I've been looking at some scripts from the forum here but I found it really tough to understand how to match patterns.

What I want to do is match 'someemail@someehost.com' in any message I send using the string from the msgsend function.

I prefer some link to a document than code to do it. But if you only know how to code it and no documents for me to read..I'll take that as well. Thanks!

edit: Here's an example of what I want to do:

Message from me to a@a.com: "Hi, please send your a message to b@b.com and tell him that I've sent you his way in search of the light."

Script would do: match the email from the message and send the part of the text after the b@b.com to b@b.com.

Message from me to b@b.com: "to a@a.com: and tell him I've sent you his way in search of the light"

Hope that helps.


RE: [help] Matching by Felu on 10-04-2006 at 03:18 PM

Iterate ChatWnd Counts something like this

code:
var Contacts = ChatWnd.Contacts;
var e = new Enumerator(Contacts);
for(; !e.atEnd(); e.moveNext())
Contact = e.item();
if("someemail@someehost.com" == Contact.Email){
//do whatever
}


RE: [help] Matching by Ezra on 10-04-2006 at 03:42 PM

Match uses a regular expression to search for parts.

Match isn't really what you want here, you want a full regex search.

You can do that by using a regex object.

WikiPedia
http://www.regular-expressions.info/