Register forum user name Search FAQ

Gammon Forum

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.
 Entire forum ➜ MUSHclient ➜ General ➜ Problem with spaces in alias

Problem with spaces in alias

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


Posted by Ventrilo   (10 posts)  Bio
Date Fri 25 Aug 2006 02:46 PM (UTC)
Message
Greetings,

I'm trying to do an alias where i type cek <mobname>, MUSHClient would automatically do:

look <mob>
look 2.<mob>
look 3.<mob>
look 4.<mob>

And this is how my alias looks like:


<aliases>
<alias
match="^cek(.*)$"
enabled="y"
regexp="y"
sequence="100"
>
<send>look %1
look 2.%1
look 3.%1
look 4.%1</send>
</alias>
</aliases>


Altho, i got a bit of a problem, because the look 2.%1 would output as look 2.<space><mob>, and so on.

How do I remove the space? Thanks much
Top

Posted by Onoitsu2   USA  (248 posts)  Bio
Date Reply #1 on Fri 25 Aug 2006 04:08 PM (UTC)
Message
match="^cek\s(.*)$"

That is what is should be, and then it will not have a captured space in it, or in place of the \s just put a space, ie. match="^cek (.*)$"

since it is set to capture anything directly AFTER the cek so cek-MOB would capture the - instead of a space if using your alias...

This WILL solve your problem :)

Laterzzz
Onoitsu2
Top

Posted by Ventrilo   (10 posts)  Bio
Date Reply #2 on Fri 25 Aug 2006 10:50 PM (UTC)
Message
Whoa, it worked! Thanks :D
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.


12,074 views.

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

Go to topic:           Search the forum


[Go to top] top

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