Menu

Regular Expression for LUA functions

2013-09-10
2013-11-12
  • Mystery Man

    Mystery Man - 2013-09-10

    I would like to create a Regular Expression in SourceCookifier that detects functions and their parameters. how can i do it?

    A classic lua function is: function name ( param1, param2, param3 ).
    I am not very familiar with regular expression, there's someone that can help me?
    Thanks

    I tried with "function.[\w$](((.[\w,$])))" but i can't take the name of the function but the name only.

     

    Last edit: Mystery Man 2013-09-10
  • skrell

    skrell - 2013-11-12

    try:
    input:
    "function[[:space:]]([[:alnum:]]+)(([[:alnum:]]+),[[:space:]]([[:alnum:]]+),[[:space:]]*([[:alnum:]]+))"

    output:
    \1 (\2,\3,\4)

    edit this form tries to format the text so the regular expression is not what i typed in. try looking at https://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Regular_Expressions

     

    Last edit: skrell 2013-11-12

Log in to post a comment.