Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- A.target
- , B.pattern
- , regexp_instr(A.target, B.pattern) as rx_instr_position
- , A.target ~ B.pattern as tilde_operator
- , regexp_instr(A.target
- , 'm/'||B.pattern||'/i') as rx_instr_position_icase
- from
- ( select 'AbCdEfffghi' as target
- union select 'Chocolate' as target
- union select 'Cocoa Latte' as target
- union select 'coca puffs, delivered late' as target
- ) A
- ,
- ( select 'choc.*late' as pattern
- union select 'coca.*late' as pattern
- union select 'chocw+late' as pattern
- union select 'choc\w+late' as pattern
- ) B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement