What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Slang Replacer

Pages: (2): « First « 1 [ 2 ] Last »
Slang Replacer
Author: Message:
Keikonium
Full Member
***


Posts: 229
Reputation: 3
35 / Male / Flag
Joined: Jul 2006
RE: RE: Slang Replacer
quote:
Originally posted by cooldude_i06
They are called regular expressions. Here is more info:
http://authors.aspalliance.com/wsk/aboutregularexpression.asp


Oh, very informative :). There are quite a few of them, and that /r is EXACTLY what I needed :D. I was wondering how to get a script to notice nothing after a character (hitting enter :P). Thank you :).
Now Playing:
[image not working] [Image: 87cc21b0.png]
07-16-2006 11:58 PM
Profile E-Mail PM Find Quote Report
stuartbennett
Senior Member
****

Avatar

Posts: 952
Reputation: 1
43 / Male / Flag
Joined: Nov 2003
O.P. RE: Slang Replacer
there seems to be quite some discussion and insight into this, i seem to have started quite a debate here. these all sound like great ideas cant wait to seem them in action.
07-17-2006 05:47 AM
Profile E-Mail PM Web Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Slang Replacer
quote:
Originally posted by Silentdragon
Hmm wouldn't this be better?
code:
/\bbr\b/mgi

Doesn't need to check if its at the begining or not or space character as it looks for word boundries, And works with punctuation. Plus it doesn't chop out the space.

Also the writer should have did a spell check. Regards is not spelled reguards.

Word boundaries don't always work that great, that's why I always use (^|\s+) and ($|\s+).
[Image: 1-0.png]
             
07-17-2006 08:33 AM
Profile PM Web Find Quote Report
stuartbennett
Senior Member
****

Avatar

Posts: 952
Reputation: 1
43 / Male / Flag
Joined: Nov 2003
O.P. RE: RE: Slang Replacer
quote:
Originally posted by Keikonium
Most people have semi good grammar, so this should be a nice little fix. When you type, you usually use spaces. Ex:

Bob says:
Hey John, I g2g, hospital time... :(
---> Hey John, I got to go, hospital time... :(

John says:
Okay, br buddy :)
---> Okay, best reguards buddy :)

So, a simple fix would be instead of:

sMessage = sMessage.replace(/br/gi,"best reguards");
make it
sMessage = sMessage.replace(/ br /gi," best reguards ");

:). Notice the space. This wont catch "br" at the end of a sentance however. But if you put an extra space at the end, it'll catch it ;).

This is how I wrote my personal script anyway.


i modified the script on my machine to have a space of br in the syntax as you suggested so it dont bring up breakfast as best regardseakfast the only think you get then is that even if you put a space after the br when you do want to say best regards the capital letter script messes up the word so it prevents the translation so i have to not use capital letter script at present.
07-22-2006 06:09 PM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« 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