【发布时间】:2015-01-09 22:09:27
【问题描述】:
我在一个表中有一个列,其中包含 xml 类型的数据,但采用 varchar 格式。原始数据示例如下:
<old_template_code>BEVA30D</old_template_code><old_template_name>Beva
30D France calls capped
15p</old_template_name><new_template_code>BEVA24M</new_template_code><new_template_name>Beva 24M France Calls Capped 15p</new_template_name>
我想知道我必须使用什么正则表达式从<old_template_code> 检索例如“BEVA30D”?
我试过了
REGEXP_SUBSTR(table.column,
'<old_template_code>*</old_template_code>') "REGEXPR_SUBSTR"
但它不起作用。
【问题讨论】:
标签: xml regex oracle oracle11g