Problem with spaces in alias

Posted by Ventrilo on Fri 25 Aug 2006 02:46 PM — 3 posts, 15,798 views.

#0
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
USA #1
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
#2
Whoa, it worked! Thanks :D