Include \* in data/replace.toml

Hello, I would like to include an escaped asterisk in my .toml file, which I will feed as a pattern to replaceRE. Is this possible?


site config

pattern = '\*.*?\*'


{{ $s := "Able *was* I ere I *saw* Elba." }}
{{ $r := findRE site.Params.pattern $s  }}

{{ $r | warnf "%#v" }} --> []string{"*was*", "*saw*"}
1 Like

Thank you!

I had tried ", """, and even `.

Yourself and Bjørn are like Gods that deliver us with superfast software and auspicious regex patterns.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.