Remove all repetitions of characters from a string using function without loop (recursion) PLSQL

Meow Nyawa
Meow Nyawa used Ask the Experts™
on
PLSQL

Write a function, which removes all repetitions of characters from a string, the string should be entered by the user.

ex: "week"
output: "wek"

(Use IN OUT option)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
Hi,

pls try
SELECT REGEXP_REPLACE(myField, '(\w)\1', '\1') "RegexReplace"  FROM DUAL;

Open in new window

Regards
Top Expert 2016

Commented:
A solution

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial