I'm sure you'll all be rolling your eyes and throwing things at me, but here goes with what should be a simple question that I have not been able to find a solution to:
I have a string
FOO,BAR/THIS(THAT)
I need to find the delimiting characters (/,()) and split the string...no problem so far.
The problem is I need to find the delimiting chars and include them with the splits.
eg: the string FOO,BAR/THIS(THAT)
should produce
FOO,
BAR/
THIS(
THAT)
I know this should be simple and I'm sure I'll suddenly awake at 3:00am slapping my forehead with a Homer "D'Oh"
I have a string
FOO,BAR/THIS(THAT)
I need to find the delimiting characters (/,()) and split the string...no problem so far.
The problem is I need to find the delimiting chars and include them with the splits.
eg: the string FOO,BAR/THIS(THAT)
should produce
FOO,
BAR/
THIS(
THAT)
I know this should be simple and I'm sure I'll suddenly awake at 3:00am slapping my forehead with a Homer "D'Oh"