The module file is just a file, with PHP functions in it... what i need to do is, grabs the contents of that file, parse for all instances of a a function definition, and parse out each of the function's important parts... function name, arguments, and main function code.
If anyone has a useful regex anywhere,or can make one, i'd sure appreciate it... i had one whipped up myself, but it doesn;t want to work....
Code: Select all
/function\s?(їa-zA-Z0-9-_]*)\s?\((ї^{]*?)\)\s?\{(.*)\s?(ї^}]*?)/mixseCode: Select all
<?php
function foo($obj, $arg)
{
$data = $arg
return $data;
}
function bar($obj, $arg2)
{
$data = $arg2
return $data;
}
?>