Epilog.
It is very important for me to reduce processing time.
Even 10 or 20 % would save hours.
Some time ago I invested in a regex hardcopy book, but the effort/performance ratio leaves to be desired.
(I can understand that these are ideal exam questions.)
In all fairness : except for 1 statement I use a lot . I.e. replacing all but uppercase or digits in a string.
I cannot beat :
The jury is still out.
Paul
It is very important for me to reduce processing time.
Even 10 or 20 % would save hours.
Some time ago I invested in a regex hardcopy book, but the effort/performance ratio leaves to be desired.
(I can understand that these are ideal exam questions.)
In all fairness : except for 1 statement I use a lot . I.e. replacing all but uppercase or digits in a string.
I cannot beat :
newstr= re.sub("[^A-Z0-9]", " ",oldstr)On a million transactions it is marginally faster than any other replace I tried.
The jury is still out.
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.