Regular expression not matching colors

Posted by Poromenos on Mon 07 Apr 2003 12:55 AM — 4 posts, 11,756 views.

Greece #0
Ok, i have this problem. I want MUCl to match this line:

<af[HY] hp[388/1242]>You guildtalk 'test again'

The prompt may or may not appear, and is of various colors. The "guildtalk" part is light blue. The trigger is:

[A-Za-z]+ guildtalk(|s) \'(.*?)\'$

which works if the text is:

Poromenos guildtalks 'test'

in which case it colors the line. Now, my question is, why doesn't "You" match the [A-Za-z]+ rule if the prompt is right before it? can if be because there is no space to separate it?
Australia Forum Administrator #1
It seems to match for me with the prompt. Are you doing a colour-dependant match?
Greece #2
Yes, it matches without colors but not with them... Also, i copied as HTML, to see if the color changes, but the "You guildtalk 'blabla'" line is all light blue, and if someone else guildtalks, it colormatches normally... I'm baffled.
Australia Forum Administrator #3
There seems to be an out-by-one error in the colour matching code. It actually matches on the colour of the preceding character. In your case, the previous character was probably the wrong colour.

This is fixed in version 3.36.