Reputation: 1866
I have a string '''val1'',''val2'''
that I want to convert to 'upper(''val1''),upper(''val2'')'
... so I decided to use regex_replace
..... the problem is that I am not able to create a reluctant pattern .... the following pattern regexp_replace('''val1'',''val2''','(''.*'')','upper(\1)')
is greedy and hence produces 'upper(''val1'',''val2'')'
... any help ?
Upvotes: 0
Views: 84
Reputation: 336228
According to RegexBuddy, normal lazy quantifiers should work:
regexp_replace('''val1'',''val2''','(''.*?'')','upper(\1)')
Upvotes: 1