Skip to content
Advertisement

Regexp_replace to replace specific value

I have data in a column at different position which i want to replace using regexp_replace().

Column value :

Business solution, management services, credit Management services, business solution, credit

I want to replace business solution with business solutions in a column nothing else I want to change..

Please guide

Advertisement

Answer

Does this help?

    SELECT
           REGEXP_REPLACE('Business solution, Business solutions, management services, credit Management services, business solution, credit'
          , 
'(^|[^[:alpha:]])business solution([^[:alpha:]]|$)','1business solutions2', 1, 0, 'i')

    from
          DUAL;
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement