I am trying the below query .
however it still not removing the character .
select regexp_replace(name ,'[][!#$%&()*+,.\/:;<=>?@\^_`{|}~-]+|(")+|(\')','') from name
To pass an apostrophe (') in the parameter, you have to double it (''), it should work like this:
select regexp_replace(name ,'[][!#$%&()*+,./:;<=>?@^_`{|}~-]+|(")+|('')','') from name;
Here is another example to remove anything that is not an expression and sign of separation:
select regexp_replace(name ,'[^[:word:][:blank:]]','') from name;
if underscore bothers you, you can try this:
select regexp_replace($name ,'[^[:alpha:][:blank:]]','') from name;
I use POSIX syntax, more about this read here: POSIX basic and extended