Reputation: 833
I want to mask name and surname in Oracle. For example; John Smith => Jo** Sm**
I can write a PL/SQL function. But i want to do this with regex. I can't write the right template. Is regex the right solution? Is there anyone who can help?
Upvotes: 1
Views: 1377
Reputation: 3016
If you want todo it with regexp you can use the following:
REGEXP_REPLACE('John Smith', '(\w{2})\w+', '\1**')
Upvotes: 3