Im sure youll 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 Im sure Ill suddenly awake at 3:00am slapping my forehead with a Homer "DOh"
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 Im sure Ill suddenly awake at 3:00am slapping my forehead with a Homer "DOh"