Code: Select all
ALIAS
pattern: ^t (\w+)$
script:
target = matches[2]
echo ("Your target is now " .. target)
KEYBIND:(no command):no modifiers + F1
script:
send ("cast stormlance " .. target)
echo ("casting stormlance")
Code: Select all
ALIAS
pattern: ^t (\w+)$
script:
target = matches[2]
echo ("Your target is now " .. target)
KEYBIND:(no command):no modifiers + F1
script:
send ("cast stormlance " .. target)
echo ("casting stormlance")
Yeah, the single letter W makes me think of "word", which to me excludes digits. You're right. The definition for w says alphanumeric characters.Iocun wrote:\w matches numbers as well as letters, so it should be fine.
nice, didn't know it could make that distinction.Iocun wrote:Yeah, but if that's not applicable (since \w-' isn't an actual range), "-" just stays "-".