[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  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] Refresh page


Posted by Tianxz   (30 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] 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.

Template:faq=33 Please read the MUSHclient FAQ - point 33.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Tianxz   (30 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] 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
[Go to top] 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,529 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]