<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">So how would I insert the name pattern into<div><br></div><div><div>Markup('mydirective', 'directives',</div><div>&nbsp;&nbsp;'/\\(:mydirective (<a href="smb://d+">\\d+</a>):\\)/e',</div><div>&nbsp;&nbsp;"mydirective('$1')");</div><div><br></div><div>I assume the "(<a href="smb://d+">\\d+</a>)" has to be replaced. I've tried to do that with many variations, without success.</div><div><br></div><div>Randy</div><div><br></div><div><br><div><div>On Jan 24, 2010, at 2:24 AM, Peter Bowers wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div class="im" style="color: rgb(80, 0, 80); ">On Sun, Jan 24, 2010 at 6:55 AM, Randy Brown&nbsp;<span dir="ltr">&lt;<a href="mailto:randy@brownragfilms.com" target="_blank" style="color: rgb(17, 65, 112); ">randy@brownragfilms.com</a>&gt;</span>&nbsp;wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
I assume there is a way for my directive to support any page name without introducing a security hole. I probably only need to support a page Name, rather than <a href="http://Group.Name">Group.Name</a>, but for future reference it would be good to know how to support either.<br>
<br></blockquote></div><div>from pmwiki.php ResolvePageName():</div><div><br></div><div>"/^($GroupPattern)[.\\/]($NamePattern)$/i"</div><div><br></div><div>$GroupPattern and $NamePattern are defined as this:</div>
<div><br></div><div>$GroupPattern = '[[:upper:]][\\w]*(?:-\\w+)*';</div><div>$NamePattern = '[[:upper:]\\d][\\w]*(?:-\\w+)*';</div><div><br></div><div>-Peter&nbsp;</div></span>
</blockquote></div><br></div></div></body></html>