how to replace characters other than <0-9>, <a-z>,<A-Z> in a string with empty character

Hello experts

I need to remove special characters in a string thus only rendering numbers and lower- and uppercase letters.

E.g.

hello-world2020!

should be changed to

helloworld2020

what is the easiest way to do that?

Kind regards Mikael

try to use string replacement with regex:
[a-zA-Z0-9]


use string replace with regexp

search [^A-Z0-9a-z]

replace empty

Yes, that did the trick. thanks.

Hi,
You may try this solution:

  1. invoke pub.string:replace

  2. service in:
    searchString = \W
    useRegex = true