jon-heard / obsidian-inline-scripts

Obsidian plugin: Type text shortcuts that expand into javascript generated text.
MIT License
134 stars 4 forks source link

Not able to make regex replacements #72

Open zanodor opened 1 year ago

zanodor commented 1 year ago

^(.+)$ -> $1 works. (But it's not good for anything.)

^(.+)$ -> [[\u$1|$1]] does not work.

In fact, if I nest $1 anywhere around square brackets, I'd need to use quotes but that would result in [[$1|$1]] (where $1 are literals).

Also, I couldn't figure out how to use lowercase/uppercase flags.

Intended use case:
Make alias with uppercase format first, pipe, lowercase in wikilinks: [[Alias|alias]].

Any ideas,

Cheers

P.S. First day trying out the plugin.