New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved regex on eventMacro plugin (Runner.pm) #1205

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@Nipodemos
Contributor

Nipodemos commented Sep 28, 2017

hello again

this pull request now add the possibility to save values you get from regex!!
for example:

$phrase = Name: Nipodemos, Age: 21
if ($phrase =~/Name: (w+)\, Age: (\d+)/ ) {
    log name is: $.lastMatch1
    log age is: $.lastMatch2
}

output:

[eventMacro log] Name is: Nipodemos
[eventMacro log] Age is: 21

this can be VERY helpful in macros, for example when you want to get an specific part of a BusMsg (like coordinates you send)
or when you in your merchant and receives the privMsg asking for an item, you can get the name of item e trigger acoordingly

Also, i've added more comments and changed the name of a few variables, because it was SO HARD trying to find out the logic behind the hole statement process, i hope this helps other people when it goes to change this file 馃槂

@lututui lututui requested a review from Henrybk Sep 28, 2017

@sctnightcore

i want it !!

@Nipodemos

This comment has been minimized.

Contributor

Nipodemos commented May 18, 2018

i am closing my PR temporaly until henryBk have free time to evaluate them ( dont know when )

@Nipodemos Nipodemos closed this May 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment