I’m trying to get the following functions working.
- When I type
#apr[1234]
, the function must create a link tohttps:/blala/1234
, with the link shown asAPR-1234
. The argument is usually numerical, but it could also be a string. - When I type
#vs[abc.def]
, the function must show it as$ABC.DEF
.
I thought “piece of cake!”, but nope, it’s not. Not for a newbie, at least. I want to keep the syntax clean, consistent and simple. I got something to work, but I would have to use either ()
or []
and enclose the argument in ""
, depending on whether the argument consists of numbers only or not.
Is there a simple way to get this done?
BTW, even ChatGPT and Perplexity didn’t manage to come up with something. Please proof that humans can still outsmart an AI