Reg expression — oracle-tech

    Forum Stats

  • 3,714,819 Users
  • 2,242,634 Discussions
  • 7,845,078 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Reg expression

User_76ZL9
User_76ZL9 Member Posts: 60 Blue Ribbon

Hi ,

Please help find the relevant function for a split sample records:


below script does not give output which want to receive.

 

  with regexp as (

  select '3000100015a7'  str from dual union all

  select '3000200220085' str from dual union all

  select '71001003400246' str from dual union all

  select '4000020000170050' str from dual

)

  select str, regexp_substr(str, '[^00]+')regexp1,regexp_substr(str, '[^00]+', 1, 2)regexp2

  from   regexp

 

 (00) my delimiter;I need only data for the beginning string split by two delimiter

 Output should be like below:  

30 00 10 00 15a7

30 00 2  00 220085

71 00 1  00 3400246

400 00 200 00 170050

Answers

This discussion has been closed.