Home > database >  Oracle regular expressions to intercept a string
Oracle regular expressions to intercept a string

Time:10-09


For bosses to help

CodePudding user response:

 select regexp_substr (remark, '[^ (state administration of taxation)] + [^ (irs)]', 1, 1), 
Regexp_replace (remark, '| the state administration of taxation revenue),
The replace (replace (remark, 'the state administration of taxation),' revenue ')
The from (select 'state tax bureau of hubei revenue as remark
The from dual
The union
Select 'state tax bureau Shanghai lujiazui revenue as remark
The from dual
The union
'select' state tax bureau of hangzhou tax revenue as remark
The from dual)

CodePudding user response:

 select regexp_substr (remark, '[^ (state administration of taxation)] + [^ (irs)] +', 1, 1), 

CodePudding user response:

With TMP as
(select 'state tax bureau of hubei revenue as remark
The from dual
The union
'select' state tax bureau of guangxi zhuang autonomous region, revenue as remark
The from dual
The union
Select 'state tax bureau of tax revenue in heilongjiang province as remark
The from dual)
The select regexp_substr (t.r emark, '[^ (state administration of taxation)] + [^ (irs)] +', 1, 1)
The from TMP t;
  • Related