What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » MSN Bot. Recieve can see? but responds to can see without the?

MSN Bot. Recieve can see? but responds to can see without the?
Author: Message:
Death4ngel
New Member
*


Posts: 5
Joined: Jun 2007
O.P. MSN Bot. Recieve can see? but responds to can see without the?
Original thread: Need help with Regular Expression with MSN bots

I'm trying to get this msn anwering machine to respond to ip addresses.
Is there a way to make it answer to ip addresses?
I tried [0-9]*.[0-9]*.[0-9]*.[0-9]*
But a dot in RegExp means anything. and the above also means any number. I need a way to make that . not in RegExp like in C++ to use the normal backslash. just \\
Any Help would be appreciated. Thanks in advance.

EDIT: Don't want to create a new thread, so just edit existing one.

This post was edited on 06-27-2007 at 12:06 PM by Death4ngel.
06-20-2007 11:24 AM
Profile E-Mail PM Find Quote Report
TheBlasphemer
Senior Member
****

Avatar

Posts: 714
Reputation: 47
36 / – / –
Joined: Mar 2004
RE: Need help with Regular Expression with MSN bots
/[0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3}/
should work :/
[Image: theblasp.png]
06-20-2007 11:32 AM
Profile PM Find Quote Report
Death4ngel
New Member
*


Posts: 5
Joined: Jun 2007
O.P. RE: Need help with Regular Expression with MSN bots
Hmm.. It doesn't work. But i edited it to
[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*
and it worked. so a backslash would mean a normal dot.
Thanks for your help.
06-20-2007 11:52 AM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Need help with Regular Expression with MSN bots
This one should be more accurate as it limits the numbers to 0-255.  Though I'm a little unsure about the (?: ) part because that is what I would use in JScript to make the stuff in the brackets not get recorded seperately.
code:
/(?:1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]\.){3}(?:1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])/

EDIT: actually this one also works (for JScript at least as \d means any number)...

code:
/(?:1?\d?\d|2[0-4]\d|25[0-5]\.){3}(?:1?\d?\d|2[0-4]\d|25[0-5])/

This post was edited on 06-20-2007 at 12:04 PM by markee.
[Image: markee.png]
06-20-2007 12:02 PM
Profile PM Find Quote Report
Death4ngel
New Member
*


Posts: 5
Joined: Jun 2007
O.P. RE: MSN Bot. Recieve can see? but responds to can see without the?
Hmm.. I need help. Under the receive section of the MSN bot, I put "can see?" without the " ". but it responds to "can see". Is there a way to make "can see?" as a whole. or is the " " can be used to make it a whole just like search engines?
06-27-2007 12:08 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: MSN Bot. Recieve can see? but responds to can see without the?
quote:
Originally posted by Death4ngel
Hmm.. I need help. Under the receive section of the MSN bot, I put "can see?" without the " ". but it responds to "can see". Is there a way to make "can see?" as a whole. or is the " " can be used to make it a whole just like search engines?
Well, if you want to let it respond on "can see?", you should escape the "?" character, like this:
code:
/can\ssee\?/
The "\s" stands for any whitespace, which can be a space (ascii 32), a newline, a carriage return or a tab character. If you only want your users to be able to use a "regular" space, replace "\s" with " " in the code above.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
06-27-2007 04:18 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On