On 2006-09-07, at 21:44, Patrick Woolsey wrote:

[EMAIL PROTECTED] sez:

What's a named subpattern, though? I've not heard of these before.
Also a bit puzzled about those angle brackets...

A named subpattern is one of the form:

(?P<name>...)

Thanks, Patrick. I didn't manage to find this information easily, at least in BBEdit's docs, but I found a Python reference via Google. I also discovered reasonably quickly that the angle brackets should be encoded as &lt; and &gt; otherwise the CLM fails to load. :-)

I assume that the idea is to provide something like this:

<key>Function Pattern</key>
<string>(?P&lt;function_name&gt;(func.*)(?P=function_name)</ string>

where the (func.*) - part of the named pattern definition - is some kind of regex pattern that matches the names of the functions you're using, and that you then refer to the named pattern again after defining it, in order to return it, and then you've got to do two, function_name and function? Is this the basic idea? Would the patterns be in parentheses or not? Or I have got it all wrong...?



--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to