Menu

Regular Expression for LUA functions

Anonymous
2013-09-10
2013-11-12
  • Anonymous

    Anonymous - 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: Anonymous 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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.