regular expression problem [message #190152] |
Tue, 29 August 2006 07:42  |
sabrieker
Messages: 8 Registered: August 2006 Location: turket
|
Junior Member |
|
|
hello i need your help
here my code
select adres,adres_koy,regexp_substr
(adres,'(( MAH\.?)|(M\.)|(MH)|(CAD)|(CD)|(CAD\.)|(CDS)|(C\.))?(^[YENIMAHALLE]|^[USK]|^[SASK]|^[KAZASK])?([[:print:]]*)((SOK)|(SK\.)|( SK)|(SOKAK)|(SOKAK\.)|(SOK\.))',
regexp_instr(adres,'(( MAH\.?)|(M\.)|(MH)|(CAD)|(CD)|(CAD\.)|(CDS)|(C\.))')+1)
from migros_source2
here i want to get substring from adres coloumn that is like this:
MERKEZ FEYZULLAH MH. TEMIZ SK.
here i want to get TEMIZ SK. part but my code takes H. TEMIZ SK.
but i dont want to get H. part also i dont want to use replace method because i have half million document
can u help me
or i explain this i want part of adres coloumn which is between MH. and SK. part but my code gives me MH. TEMIZ SK.
i am looking for TEMIZ SK. it isnot important for me MH. part
and why doesnt this one work
update migros_source set adres_belde=regexp_substr(adres_koy,'([[:print:]]*) CAD')
where regexp_like(adres_koy,'CAD')
|
|
|
|