Dear experts and regular expression wizards,
I need to extract numbers with European comma seperation from a string.
For instance 4,32.
Sometimes, however, I will have a single integer such as 4 embedded in a string only.
I tried the regular expression below, which only works for comma separarated values. Can you please show me how to extract single numbers as well as.
To be precise I need a regular expression that extracts 4 and 4,32 from a string such as "The result values are 4 and 4,32! Recommended task..."
select to_number(trim(regexp_substr(str_result,'[0-9][,][0-9]'))) str_result, decode((str_bewertung),'A+',9,'A',8,'A-',7,'B+',6,'B',5,'B-',4,'C+',3,'C',2,'C-',1) as bewertungspunkte, str_bewertung str_bewertung from (select str_typ, str_result, str_bewertung from tbl_matrix_result where LNG_GEBIET = :xp_cnt_gebiet and STR_LRT = :xp_str_lrt and INT_BE = :xp_be and INT_WG = :xp_wg and EVAL_TYPE = 4 and lower(str_typ) = 'biotopbaum' );