I am using RegularExpressionConversion (from ZConfig/datatypes.py) and thought it be neat to have an init method looking like this:

def __init__(self, regex, options):
   self._rx = re.compile(regex, options)

so that we can pass re.DOTALL as an argument for example.
And also have the call method:

def __call__(self, value):
        m = self._rx.match(value)

use "search" instead of "match", to not be forced to have characters matching at the beginning of "value".

Is it a good idea? Is there any reason why we couldn't do that?

S i x  F e e t  U p , I n c .  |  "Nowhere to go but open source"
Silicon Valley: +1 (650) 401-8579 x605
Midwest: +1 (317) 861-5948 x605
Toll-Free: 1-866-SIX-FEET
http://www.sixfeetup.com  |  Zope/Plone Custom Development
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to