a regular expression for detecting PHP commands in a template?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm away from my home computer, where I have a copy of RegEx Buddy that
might let me figure this out on my own.

I've edited the php.ini file on my server so PHP the only way to start
a PHP tag is <?php

I've got a system in place that keeps each PHP function in its own
file, with the file having the same name as the function. Functions are
only imported when they are needed. Before a template is evaluated,
I've got a script that looks through it for every PHP command and
imports it. The script can handle this:

<h2>All weblog entries</h2>
<?php showAllWeblogEntries(); ?>

But I have been unable to think of the regex expression that would
allow me to find PHP functions used as parameters to PHP functions. I
don't know how to capture the parameter here:

<?php makeThumbnailImage(showCurrentImage()); ?>

Any ideas?

Site Timeline