String Replace: Failing Index Position marked incorrectly / always at the beginning

Hi,

when a RegEx was provided that is not compatible or erroneous, an error is thrown but the “^” is always set at the beginning and not the actual index position.

Node: root:20
Message:Invalid node settings: Coding issue: Illegal character range near index 14
\d(?:[.,0-9/-\s]+)?[\w]+\s?
^

image

Node: root:20
Message:Invalid node settings: Coding issue: Illegal character range near index 12
\d([.,0-9/-\s]+)?[\w]+\s?
^

image

PS: I noticed that the console indicates the correct position:

Best
Mike

This looks to me too be a manifestation of one of the negatives aspects of the modern UI; being html based it doesn’t reflect space characters unless they are output explicitly as non-braking spaces  , or wrapped in preformatted text tags.

So, whilst I don’t know, I suspect the error message is being produced with spaces placed before the caret ^ symbol and then these are being ignored by the browser when it renders the output.

For that error message to actually work positionally, the font would need to be made monospaced too or the ^ is never going to align correctly except by accident!

E.g, the same text output as regular vs preformatted…

The error is here
^

The error is here
             ^
2 Likes