Noob Questions.
-
- Posts: 2
- Joined: Mon Jun 10, 2019 4:42 pm
Noob Questions.
Can someone explain to me what the matches[#] is and how to use it properly? I'm trying to learn how to script and stuff but cant find clear answers
Re: Noob Questions.
Hey manwichman44, welcome to Mudlet!
Did you find the manual in wiki already? There are lots of examples. E.g. here is the alias introduction, which uses a lot matches:
https://wiki.mudlet.org/w/Manual:Introduction#Aliases
Did you find the manual in wiki already? There are lots of examples. E.g. here is the alias introduction, which uses a lot matches:
https://wiki.mudlet.org/w/Manual:Introduction#Aliases
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Noob Questions.
For the record the matches entity is a global Lua table - i.e. visible in all parts of the Lua sub-system for example: Triggers, Timers, KeyBindings, etc. - (and the profile's command line) which gets populated automagically by some of the C++ application code with data from the results of the use of the Perl Compatible Regular Expression (PCRE) library and some other bits of the application. This is so that users' scripts/packages can get the output and do things with or in response to that data. The contents of that table are somewhat dynamic and there are some places where it may not contain what you think it might because something else has already updated it.
{There is a related multimatches table that is used for, IIRC, multi-line triggers which is, I think effectively a table of matches tables, one for each line in the trigger...}
{There is a related multimatches table that is used for, IIRC, multi-line triggers which is, I think effectively a table of matches tables, one for each line in the trigger...}