Without the greedy flag on the regexp, String.replace will just replace the first match. While at it, also make sure to convert to a string when formatting tag values. This allows tag values to be e.g. numbers.
6.8 KiB
6.8 KiB