Any time I want to change a piece of text that is a large part of the text, I have to do something like always :
"(? P & lt; start & gt; some_pattan) (? P & lt; substitution & gt; foo) (? P & lt; end & gt; termination) By adding the start group with new data for the group / code> and change and then the end group.
Is there a better way for this?
View in Python for (? =?) and (? & Lt; = ...) - I'm pretty sure that they are what you want, they match the strings, but do not "consume" those bits of stars that they match We do.
Comments
Post a Comment