regex (?!..) problem
wolfgang at rohdewald.de
Mon Oct 5 10:02:57 CEST 2009
On Monday 05 October 2009, Carl Banks wrote:
> Why do you have to use a regexp at all?
not one but many with arbitrary content.
please read my answer to Stefan. Take a look
at the regexes I am using:
moreover they are saved in a data base. I would
not want to do that with python code.
Actually I already did that - I defined Python classes
which made it possible to write a rule as (example)
self.mjRules.append(Rule('Fourfold Plenty', 'PKong()*4 + Pair()',
this was then executed with eval. But eval seems unsafe
and some rules were simply not writable that way without
specialized hard wired python code. That is not what I
envision. Also regex turned out to have about the same
More information about the Python-list