The problem with triggers and aliases (using the Send box) is that the client expands out backslashes first, then sends it to Lua which expands backslashes again. Thus in Send To Script you have to double the backslashes again (that is, four backslashes for every one you really want).

This is obviously fairly tedious. I suggest using a script file, or using a Lua pattern (eg. string.match) which avoids the problem because it uses "%" to escape special fields (like alphabetic sequences) instead of "\".