<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 12, 2013 at 11:39 PM, Simon <span dir="ltr"><<a href="mailto:nzskiwi@gmail.com" target="_blank">nzskiwi@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>most directives accept anything within their scope, then use </div>

<div><font face="courier new, monospace">$arg = ParseArgs($args);</font></div><div><br></div><div>Then the arguments defined are processed, and any unexpected arguments are disregarded.</div><div><br></div><div>So my corollary question is:</div>



<div>Is this good practice, or just expedient, given the difficulty (as I perceive it) of defining a parameter list in regex?</div></blockquote></div><br></div><div class="gmail_extra">Yes, both. It's good practice as well as being expedient.  As already mentioned ParseArgs() is well-tested, elegant code which saves a developer a ton of time.  At the same time its ability to handle positional or named parameters and to allow parameters to be specified in any order allows great flexibility on the part of users entering markup in pages (consider how difficult it would be if you had to remember the exact order of each parameter in a complex markup such as pagelist).<br>

<br></div><div class="gmail_extra">-Peter<br></div></div>