Dear gurus, I already get good help for other problem. I hope to follow guidelines this time.
In our firm we have to deal with the GUID. Now, the GUID come in 3 formats (see the other posting
of the GUID in this newsgroup). I have the several GUIDS as below
with mydata as (
select '77DB966B620D4FEBB9959D016E0BD590' as guid from dual union
select '159F25C035E845CFA95CFF4F3365B330' from dual union
select '0485FA87A2FF445E965333B6980EC176' from dual)
select guid from mydata;
Now, instead of the phrase "select guid from mydata" what I wish for is to have the
select regexp_replace(guid, xxxxxxxxxxxx, yyyyyyyyyyyy, zzzzzzzzzzz) from mydata for the following of the result.
desired result
select regexp_replace(guid, xxxxxxxxxxxx, yyyyyyyyyyyy, zzzzzzzzzzz) from mydata;
77DB966B-620D-4FEB-B995-9D016E0BD590
159F25C0-35E8-45CF-A95C-FF4F3365B330
0485FA87-A2FF-445E-965333B6980EC176
and also desired result - difference in expression
{77DB966B-620D-4FEB-B995-9D016E0BD590}
{159F25C0-35E8-45CF-A95C-FF4F3365B330}
{0485FA87-A2FF-445E-965333B6980EC176}
the needing is as the follows: put the - (hyphen charachter) at 8, 12, 16, 20 in the GUID string
and also possible choose add the bracket cureley { } at beginning end of string. I am not very strong
(still doing the learning) of the regular expressions. If any guru can help, I would be most grateful.
Jehangir.