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
➜ Lua
➜ Need to refine the previous alias.
|
Need to refine the previous alias.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Neoshain
(38 posts) Bio
|
| Date
| Thu 10 Oct 2013 05:27 PM (UTC) |
| Message
| So, this is the alias I'm using now:
<aliases>
<alias
match="rpose*"
enabled="y"
send_to="12"
omit_from_output="y"
ignore_case="y"
sequence="100"
>
<send>presort = string.gsub ("%1", "%a+", replacements)
message = string.gsub (presort, "'([%a%d%s.,:;!?@]*)'", "''@c%%1@y''")
Send("rpose @y" ..message.."@n")
</send>
</alias>
</aliases>
I need to change it to match double quotations, ( " ) not singles. ( ' ) I've tried this:
message = string.gsub (presort, "%"([%a%d%s.,:;!?@]*)%"", "''@c%%1@y''")
Send("rpose @y" ..message.."@n")
</send>
</alias>
</aliases>
But I can see why this doesn't work. Is there a way to do this?
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Thu 10 Oct 2013 10:25 PM (UTC) |
| Message
| If you want double quotes in a string, start and end it with single quotes.
eg.
print ( 'Nick says "hello" ' )
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Neoshain
(38 posts) Bio
|
| Date
| Reply #2 on Fri 11 Oct 2013 01:06 AM (UTC) |
| Message
| Wow. Omgsh. That was so simple.
| | 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,513 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top