On 5/29/17 2:49 PM, "lilypond-devel on behalf of Winston, Charles R." <[email protected] on behalf of [email protected]> wrote:
> > >> On May 29, 2017, at 4:27 PM, David Kastrup <[email protected]> wrote: >> >> Charles Winston <[email protected]> writes: >> >>>> On May 29, 2017, at 1:40 PM, David Kastrup <[email protected]> wrote: >>>> >>>> Charles Winston <[email protected]> writes: >>>> >>>>> Could you explain the following line which appears all over convert >>>>>rules.py: >>>>> >>>>> str = re.sub (r³str1², r³str2², str) >>>>> >>>>> I want to change all instances of ³partcombine...² to >>>>> ³partCombineŠ". If I were to do this: >>>>> >>>>> str = re.sub (r³partcombine², r³partCombine², str) >>>>> >>>>> Would that work? >>>> >>>> Probably would change a couple too many occurrences. >>> >>> Could you elaborate? >> >> git grep partcombine ly Documentation >> >> will list more or less all occurences bound to be changed by your >> script. > >Yes. I'm just confused when you say that the script will probably change >too many occurrences. What do you mean by too many? I want to change all >occurrences. I can't speak for David, but you may wish to start on a word boundary. somepartcombine would change to somepartCombine with your given regex. I don't know if that's a problem or not; you'd want to look carefully to make sure there's nothing that would be adversely affected by being in the middle of a word. HTH, Carl _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
