Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Regular expression not matching colors
|
Regular expression not matching colors
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Mon 07 Apr 2003 12:55 AM (UTC) |
| Message
| 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? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Mon 07 Apr 2003 05:14 AM (UTC) |
| Message
| | It seems to match for me with the prompt. Are you doing a colour-dependant match? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #2 on Mon 07 Apr 2003 08:02 PM (UTC) |
| Message
| | 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. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Tue 08 Apr 2003 08:22 AM (UTC) |
| Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,149 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top