Re: Spaces

From: Álvaro G. Vicario <>
Date: Thu, 29 Jan 2009 16:57:24 +0100
Message-ID: <glsjl8$fgh$> escribió:
> no answer yet, but I've made some progress. Is there a way to tell
> REGEXP_INSTR to ignore spaces in my string?
> Sale I have this expression:
> SELECT REGEXP_INSTR('"FO EM, FO LA","ABCDEF","12345"','"([[:alnum:]])+,
> ([[:alnum:]]+)"') FROM DUAL;

Do you mean something like this?


Or if you don't want to match stuff like '" , "':


This could use some polish but it's the general idea.

> I can have any number of spaces in any part of the string. How can I
> tell Oracle to ignore the spaces when performing the check? Do I need
> to replace them? I need the spaces there, but ignore them during the
> pattern match.

Well... I don't know about performance but replacing them might be the most reliable way. Writing a complex regexp that covers all cases can be tricky.

-- - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
-- Mi web de humor al baño María:
Received on Thu Jan 29 2009 - 09:57:24 CST

Original text of this message