Hi.
I'm from Denmark and my english isn't good, but i'll try.
I try to check if the first line contains "Antal tegn sendt:".
This is the message I'm sending:
Antal tegn sendt:
A = 8 B = 114 C = 6
D = 8 E = 14 F = 2
G = 6 H = 2 I = 4
J = 2 K = 2 L = 6
M = 2 N = 12 O = 2
P = 2 Q = 2 R = 6
S = 6 T = 14 U = 2
V = 2 W = 2 X = 2
Y = 2 Z = 2
Ialt er der sendt 232 tegn
But it says that the firs line doesn't contains "Antal tegn sendt:".
Here is my code:
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if (Message.match(/^Antal tegn sendt:($|\s+)/m) == null)
{
Lille = Message.toLowerCase();
for (i=0;i<Lille.length;i++)
{
if (Lille.charCodeAt(i) < "123" && Lille.charCodeAt(i) > "96")
{
Alfabet[Lille.charCodeAt(i)-97]++;
}
}
}
return Message;
}
Addition: Parts of the code are italic, if it isn't it is smilies
Thanks in advance