M
Mark Downes
I need to split a string based on a character, such as a space (0x20).
The caveat is that I need to ignore the character if it is found
between a pair of some other characters, such as single-quotes. For
example (where _ denotes a space character):
ab_cd_'ef'_'g_h'_i_'j_k_l'
I should get back
ab
cd
ef
g_h
i
j_k_l
I'm sure there is an easy solution to this if you are a regex guru.
As for me, I'm clueless.
The caveat is that I need to ignore the character if it is found
between a pair of some other characters, such as single-quotes. For
example (where _ denotes a space character):
ab_cd_'ef'_'g_h'_i_'j_k_l'
I should get back
ab
cd
ef
g_h
i
j_k_l
I'm sure there is an easy solution to this if you are a regex guru.
As for me, I'm clueless.