sql - Oracle Regexp - substr by multiple spaces but not single space -


lets have string-

"a   b      cc  d d  e" 

i'd able

regexp_substr('a   b      cc  d d  e', ??, 1, 4) 

and have return "d d".

i using "[^ ]+" pattern, splits single spaces don't want.

i think want:

select regexp_substr(col, '([^ ]*[ ]?[^ ]+)+', 1, 4) 

Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -