Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Regxp help...

NapsterDec 1 2010 — edited Dec 2 2010
Hi Guys,

I have a question on reguler expressions...
I a following type of a string...
 
(1.[R_H]+2.[R_R])/(1.[R_H]*1.[R_FT])
 
Here I need to replace the variables such as 1.[R_FT] with numbers...
 
numbers are defined in two tables (values can have 1. or 2. only)
 
Table_1 = for numbers starting with 1.
 
Constant  Value
R_H         2
R_R         3
R_FT        1
 
Table_2 = for numbers starting with 2.
 
Constant  Value
R_H         1
R_R         1
R_FT        4
 
Now I need to calculate the value as below...
 
(1.[R_H]+2.[R_R])/(1.[R_H]*1.[R_FT]) ---> (2+1)/(1*4) = 0.75
 
There can be n number of 1.[R_H] type of constants and any mathamatical operation can be used in between...
And there can be numarical values also in between like (100+2.[R_R])/(1.[R_H]*1.[R_FT])

Thanks...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2010
Added on Dec 1 2010
7 comments
206 views