I want to use the function list function from notepad ++ for my PHP code Actually, the function list works fine if I write a PHP tag (?>). But if I did not close the PHP tag, the list of functions does not work.
I just want the list of functions still working, even I didn’t close the PHP tag
See image Above without a PHP tag. At the bottom is a PHP tag with a tag.
enter image description here
Then I read this, notepad + doc function list block https://notepad-plus-plus.org/features/function-list.html
I think I need to edit the regex. But the problem is that I cannot edit the regex because the regex looks too complicated for me.
This is a regular expression and xml list of PHP functions
<parser id="php_function" displayName="PHP" commentExpr="((/\*.*?\*)/|(//.*?$))"> <classRange mainExpr="^[\s]*(class|abstract[\s]+class|final[\s]+class)[\t ]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*([\s]*|[\s]*(extends|implements|(extends[\s]+(\\|[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+[\s]+implements))[\s]+(\,[\s]*|(\\|[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))+[\s]*)?\{" openSymbole = "\{" closeSymbole = "\}" displayMode="node"> <className> <nameExpr expr="(class|abstract[\s]+class|final[\s]+class)[\s]+[\w]+"/> <nameExpr expr="[\s]+[\w]+\Z"/> <nameExpr expr="[\w]+\Z"/> </className> <function mainExpr="^[\s]*((static|public|protected|private|final)*(\s+(static|public|protected|private|final))+[\s]+)?(function[\s]+)+([\w]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([^\{]*\{"> <functionName> <funcNameExpr expr="(?!(if|while|for|switch))[\w_]+[\s]*\([^\{]*"/> <funcNameExpr expr="(?!(if|while|for|switch))[\w_]+"/> </functionName> </function> </classRange> <function mainExpr="^[\s]*function[\s]+\w+\(" displayMode="$className->$functionName"> <functionName> <nameExpr expr="(?!(if|while|for))[\w_]+[\s]*\("/> <nameExpr expr="(?!(if|while|for))[\w_]+"/> </functionName> <className> <nameExpr expr="[\w_]+(?=[\s]*::)"/> </className> </function> </parser>
Can someone help me
thanks
source share