Data output formatted [message #362847] |
Thu, 04 December 2008 05:13 |
J1357
Messages: 33 Registered: November 2008
|
Member |
|
|
Data is like M1_[M2]-[[M3]]+[M4]
Now i want the data which will remove all the brackets from one string
Output to be M1 M2 M3 M4 imean all the no of [ which can be of any no like [M1].[[[M2]]]+[M3]_M21
Output would now be M1 M2 M3 M21...like wise
Logic needs to take the innermost brackets to be coverted to strings.
Also, the M1 may be "M1_23+-" which may have special characters.
The data output has to be intact what-ever the data may have.
Any ideas ...Gurus
|
|
|
|
|
Re: Data output formatted [message #362876 is a reply to message #362847] |
Thu, 04 December 2008 06:35 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
I've no idea what this meansLogic needs to take the innermost brackets to be coverted to strings.
Also, the M1 may be "M1_23+-" which may have special characters.
The data output has to be intact what-ever the data may have. , or what effect it would have on your desired output, which you haven't given in anywhee near enough detail:
This does something like what you have asked for:
with src as (select 'M1_[M2]-[url=/wiki/M3]M3[/url]+[M4]' col_1 from dual union all
select '[M1].[[url=/wiki/M2]M2[/url]]+[M3]_M21' from dual)
select col_1,regexp_replace(col_1,'[^M0-9]+',' ')
from src;
|
|
|
Re: Data output formatted [message #362882 is a reply to message #362847] |
Thu, 04 December 2008 06:57 |
J1357
Messages: 33 Registered: November 2008
|
Member |
|
|
What i meant was that the data which is to be brought inside the inner most bracket may be numeric ,alphanumeric or even special characters data.
Hope picture is more clearer.
Thanks for your inputs ...
|
|
|
Re: Data output formatted [message #362887 is a reply to message #362882] |
Thu, 04 December 2008 07:09 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Hardly any clearer at all.
I have no real idea whether you are trying to strip the brackets and other symbols out of the string, or whether you are trying to perform some calculations.
Please give us a clear description of what yuo are trying to do, with enough examples that someone who knows nothing about what you are trying to do could be reasonably expected to understand the problem
|
|
|