Shoutbox

MSN Bot. Recieve can see? but responds to can see without the? - 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: MSN Bot. Recieve can see? but responds to can see without the? (/showthread.php?tid=75487)

MSN Bot. Recieve can see? but responds to can see without the? by Death4ngel on 06-20-2007 at 11:24 AM

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.


RE: Need help with Regular Expression with MSN bots by TheBlasphemer on 06-20-2007 at 11:32 AM

/[0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3}/
should work :/


RE: Need help with Regular Expression with MSN bots by Death4ngel on 06-20-2007 at 11:52 AM

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.


RE: Need help with Regular Expression with MSN bots by markee on 06-20-2007 at 12:02 PM

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])/

RE: MSN Bot. Recieve can see? but responds to can see without the? by Death4ngel on 06-27-2007 at 12:08 PM

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?


RE: MSN Bot. Recieve can see? but responds to can see without the? by Matti on 06-27-2007 at 04:18 PM

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.