Reputation: 31
I am fairly new to regexp_substr in oracle. I want extract just alphanumeric character from the string below. I have used below query but it doesn't seems to be working as expected.
select
regexp_substr('Save up to 10% on National Brands and 20% on Quill Brand Laser Toner','[[:alnum:]]+') string
from dual;
I want the output to be look like this
Save up to 10 on National Brands and 20 on Quill Brand Laser Toner
or
Saveupto10onNationalBrandsand20onQuillBrandLaserToner
Thanks in advance. :)
Upvotes: 3
Views: 7584
Reputation: 606
I think you're looking for regexp_replace
select
regexp_replace('Save up to 10% on National Brands and 20% on Quill Brand Laser Toner',
'[^[:alnum:]]', '') string from dual;
Upvotes: 3