On Mon, 26 Aug 2019 at 18:19, Dick Visser <
dick....@geant.org> wrote:
>
> On Mon, 26 Aug 2019 at 11:03, Mohtashim S <
mohta...@gmail.com> wrote:
> >
> > I have a multiline variable "filedet" that contains string text having multiple single quotes.
> >
> > I wish to replace the single quote to double quotes so that It can be acceptable for SQL query and below is what I tried.
> >
> > filedet: "{{ ( filedet ) | replace('/'','/'/'') }}"
> > filedet: "{{ ( filedet ) | replace(''%c '%58'',''%c '%58''%c '%58'') }}"
> >
> > It does not help. Can you please suggest ?
I assume that "it does not help" means that you're getting an error.
It would have been nice to report that.
In any case, what you have now will result in a loop.
I you really must, you can replace the single quotes with double quotes by:
doubles: "{{ filedet | regex_replace(\"'\", '\"') }}"
Not sure why you're putting parentheses around the variable?
Dick