View Single Post
Old 05-23-2025, 08:43 AM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,544
Karma: 5703586
Join Date: Nov 2009
Device: many
No the function replace is the only thing specified in the replace field. It is not a substring replacement, it is a function doing the replacement.

All search match groups are provided to your function. So you get the entire string that was matched, plus all of the values for each match group to use as you see fit in your function.

So can use your own python code to replace anything you want with anything you want. You can build the entire replacement value. You just can not try to squeeze it into the replace field, your function should handle that.

Last edited by KevinH; 05-23-2025 at 08:52 AM.
KevinH is online now   Reply With Quote