Dataset: replace string case insensitive

I have a use case where I need to create a new calculated field by replacing substring of a column in dataset.
I’m using replace function and by default it is case sensitive.

How can I make it case insensitive?
I tried something like replace(toLower(Column), toLower(substring), replacement), but that would return the entire result in lower case.

eg: replace(toLower(‘New YORK’), toLower(‘neW’), ‘old’) will return ‘old york’. How can I get it return ‘old YORK’

@tlm234 This is not a quicksight problem, you will have this problem with any programing language unless you have access to regex_replace.

For the sake of simplicity, I would recommend handling this at the data source level or in SQL with regex_replace. Quicksight doesn’t have regex_replace yet.