Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. select
  2. A.target
  3. , B.pattern
  4. , regexp_instr(A.target, B.pattern) as rx_instr_position
  5. , A.target ~ B.pattern as tilde_operator
  6. , regexp_instr(A.target
  7. , 'm/'||B.pattern||'/i') as rx_instr_position_icase
  8. from
  9. ( select 'AbCdEfffghi' as target
  10. union select 'Chocolate' as target
  11. union select 'Cocoa Latte' as target
  12. union select 'coca puffs, delivered late' as target
  13. ) A
  14. ,
  15. ( select 'choc.*late' as pattern
  16. union select 'coca.*late' as pattern
  17. union select 'chocw+late' as pattern
  18. union select 'choc\w+late' as pattern
  19. ) B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement