Directly read real life example atlast.
This is my sql templates using python3
SEARCH_TEMPLATE = "SELECT {columns} FROM {table} WHERE {field} REGEXP %