Alex Gomes Alex Gomes - 10 months ago 75
Java Question

Replacing all non-alphanumeric characters with empty strings

I tried using this but didn't work-

return value.replaceAll("/[^A-Za-z0-9 ]/", "");

Answer Source

Why did you put those /? Just use [^A-Za-z0-9 ].