Solved
We can turn my approach to a function where you can select the character to delete

Or we could also create a function to replace one character for another one (empty string means delete)

And here is a string trimmer using "search" and "substr" as you had tried to do

Note that this approach will not work OK if ORIGIN is set to a value different from zero AND the calculation option "ORIGIN in Strings" is set (which is usually is not by default).
Prime 11 file attached
Welcome to the PTC Community
No account yet? Create an account
Please use your PTC eSupport account.
LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

