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
➜ Why the trigger can't work
Why the trigger can't work
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Tianxz
(30 posts) Bio
|
Date
| Fri 21 May 2010 05:58 AM (UTC) Amended on Fri 21 May 2010 06:06 AM (UTC) by Tianxz
|
Message
| I write the reg:^[>\s]*(.{2,12})$ and choose the color option is red.
when the output is :
abcdef
the reg can work the %1='abcdef';
but sometime it display
> abcdef
the reg can't work. The text abcdef is red color and > is white.
How can I pick the correct text I need.
Oh, It doesn't work on second output when I change the reg to (.{2,12})$ or .*
Does it work only with the text in whole line all is red?
Thank you. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 21 May 2010 06:05 AM (UTC) |
Message
| The colour matching is on the first matching character.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Tianxz
(30 posts) Bio
|
Date
| Reply #2 on Fri 21 May 2010 06:42 AM (UTC) |
Message
| I think the first matching character of the reg ^[>\s]*(.{2,12})$ for > abcdef is "abcdef". The "abcdef" is red . So it should be match. But why it can't work? Are there some thing I misunderstand? Could you explain for me? | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #3 on Fri 21 May 2010 07:00 AM (UTC) |
Message
| If the line is "> abcdef" then the first matching character is ">" isn't it?
It's not the thing in brackets (%1) it is the first character of what the trigger actually matches.
The FAQ item I mentioned shows how you can test for colours further into the trigger. |
- 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.
13,461 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top