Hi all,
I want to select the substring of a string that are separated by tab spaces, most importantly if the there are two tab spaces together then the null value should be selected for that occurrence.
Kindly help with regexp_substr to achieve this.
For example -
If the string is l_string := "This is an example string"
I want to use regexp_substr in such a way as explained below to select based on the occurrence of tab spaces
var1 = This
var2 = is
var3 = an
var4 = NULL (This is NULL because there are two tab spaces in the above string)
var5 = example
var6 = string
I've used the below code but it doesn't help, it considers two tab spaces as single one and ignores the null value
REGEXP_SUBSTR (l_string,
'[^' || CHR (9) || ']+',
1,
1)
Thanks!