How to capture this?

Post Reply
Vooku
Posts: 72
Joined: Sun Aug 21, 2016 2:42 pm

How to capture this?

Post by Vooku »

I want to capture each 'name' returned in this format...

Katumi tells you '@Vooku: name1, name2, name3, name4, name5, name6, name7, name8,
name9,'

Might have a few lines of wrap-around text if that matters.

Thanks!

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#2283

Re: How to capture this?

Post by Belgarath »

You'll use a regex pattern like this: ^Katumi tells you '@Vooku: (.+)'$

And you'll parse it into a table.
Code: [show] | [select all] lua
names = matches[2]:split(', ')

Vooku
Posts: 72
Joined: Sun Aug 21, 2016 2:42 pm

Re: How to capture this?

Post by Vooku »

Thanks much! How do display or see the contents of this table? How do I then delete the contents?

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#2283

Re: How to capture this?

Post by Belgarath »

Vooku wrote:
Wed Dec 19, 2018 1:29 pm
Thanks much! How do display or see the contents of this table? How do I then delete the contents?
The wiki has some good documentation on this: https://wiki.mudlet.org/w/Manual:Table_Functions

Post Reply