String interpolation in Foundry code workspaces

Trying to do regex matching with a variable (so target string looks like “{my_variable}.”) for all rows in a dataset and Foundry doesn’t seem to like it. I’ve tried f strings, str.format, string templates and nothing works. Every time when I run my full Python transform I get 0 rows selected. Anyone know how to fix this?

Like This?
AIP Assist-




Yeah like that, but inserting a variable into the string being used for regex matching