我使用replace
进行以下SQL查询SELECT
replace(
replace(
replace(
replace(
replace(email_text , 'This email is to notify you that for one or more records the Clearance has been Requested. Please follow the link below to go directly to this record.', '')
, ':', '</th>:<th>')
, '<BR/></th>','<BR/>')
, 'http</th>:<th>', 'http:')
, '</ul>', '</th></ul>')
INTO v_result
FROM record.notification
WHERE record_notification_id = p_recordnotification_id;
在上面的代码中我有
replace(email_text , 'This email is to notify you that for one or more records the Clearance has been Requested. Please follow the link below to go directly to this record.', '')
现在,我想使用替换email_text与以&#39;此电子邮件&#39;开头的句子。以&#39;此记录结束。&#39; 而不是写完整的句子。 请建议。
答案 0 :(得分:2)
使用正则表达式:
regex_replace(email_text, 'This email.*this record[.]', '')