Home » SQL & PL/SQL » SQL & PL/SQL » regular expression problem
regular expression problem [message #190152] Tue, 29 August 2006 07:42 Go to next message
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:
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')
Re: regular expression problem [message #190161 is a reply to message #190152] Tue, 29 August 2006 08:44 Go to previous message
Messages: 2794
Registered: April 2006
Senior Member
SQL> select regexp_substr('MERKEZ FEYZULLAH MH. TEMIZ SK.','\w+\s\w+\.$') "Name" from dual;


Previous Topic: interview question
Next Topic: How do I find special characters using a regular expresion?
Goto Forum:

Current Time: Sat Aug 19 21:15:19 CDT 2017

Total time taken to generate the page: 0.36296 seconds