0

Am trying to use backreference expression to take out three subexpressions from a search, and reposition each subexpression as follows:

 SELECT REGEXP_REPLACE('AAA 123 ppp','(^[[:alpha:]]+) ([[:digit:]]) ([[:alpha:]]+)','3円 1円 2円') from dual

However am getting the result as AAA 123 ppp where expecting ppp AAA 123 Where am i getting it wrong?

asked Apr 15, 2017 at 10:08

1 Answer 1

0

Missing + after [[:digit:]]

select regexp_replace('AAA 123 ppp','(^[[:alpha:]]+) ([[:digit:]]+) ([[:alpha:]]+)','3円 1円 2円') 
from dual

ppp AAA 123

answered Apr 15, 2017 at 10:42

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.