Hi,

if I have a string:

sql = """
where 1 = 1
and field = :value 
and field2 in (:list)
"""

I would like to replace every word that starts with ":" in the following way:
1. replace ":" with "${"
2. at the end of the word add "}"


An example should look like this:

where 1 = 1
and field = ${value}
and field2 in (${list})

How to do that?

Regards.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to