Your question: Is it possible to change or remove a specific single character in a text string without altering other instances of that character in the string? I would say, yes, if using the
value.replace function. replace can take input as a regex pattern or literal characters. Anyway, I'm no expert on LC classification "numbers" but I composed something that works with your two examples. I'm not sure how generalizable it will be.
regex: (\w+\d+)\.(\d+)\.(.*)
implementation: value.replace(/(\w+\d+)\.(\d+)\.(.*)/,"$1.$2. $3")
Explained:
\w = "word" character
\d = digit or number
\ = escape character ; what follows, follows literally. e.g. \. means '.' (escaped the period to distinguish it from the regex wildcard which is '.' and so creates ambiguity in this case)
+ = quantifier, 1 or more
* = quantifier, 0 or more (so .* means match a whole bunch of anything)
() = capture group ; then referenced by the order identified, e.g. $1, $3, $2