Suppose There is a string
A.B....C.......D.........E........F In this string dots (.)
are not having fixed count in between of string. I want the
output to have string with one dot between. I.e.
A.B.C.D.E.F
Answers were Sorted based on User's Feedback
Answer / oddabout.com
SELECT replace(replace(replace('A.B....C.......D.........E........F','.',' @'),'@ ',''),' @','.') FROM dual
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / dilip kumar
SELECT REGEXP_REPLACE (
Replace ('A.B....C.......D.........E........F', '.', ' '),
'( ){1,}',
'.')
FROM DUAL;
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / sreenivasulu sangatipalli
SELECT regexp_replace('A...B..C.D......E....F', '[.]+', '.') FROM DUAL;
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / anuradha
SELECT REGEXP_REPLACE (
REPLACE ('A.B....C.......D.........E........F', '.', ' '),
'( ){2,}',
'.')
FROM DUAL;
Is This Answer Correct ? | 3 Yes | 5 No |
Answer / sunaksha
select REGEXP_REPLACE ('A.B....C.......D.........E........F','.{1,}',
'.') FROM DUAL;
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / sandeep kumar
select replace(regexp_replace(replace
('A.B....C.......D.........E........F','.',' '),'( )
{2,}',' '),' ','.') from dual
Is This Answer Correct ? | 1 Yes | 13 No |
In what condition is it good to disable a trigger?
What is clustered and non-clustered indexes?
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?
How can I tell if sql is running?
What is pl sql commands?
Explain how exception handling is done in advance pl/sql?
Main diff between varray and nested tablea
Can sql developer connect to db2?
How do I partition in sql?
What is sql keyword?
Why we use cross join?
What is the requirement of self-join?