I'm trying to split the following string:
"add galaxy [Milky way] elliptical 13.2B"
the resulting array I want to achieve should contain the following strings:
"add","galaxy","Milky way","eliptical","13.2B"
I tried using string.Split() and experimented with different method parameters, but I didn't achieve what I wanted.
How can I achieve this result?
EDIT: I found a way to do it using a regular expression.
@"[A-Za-z0-9.]+|(#.*?#)|(\[.*?\])"