I want to get string 1
, string 2
and string 3
, ... from below string:
...
BEGINID:"MyId":string 1,string 2,string 3, string ...,ENDID
...
(string 1
, string 2
and string 3
, ... don't contain charater ,
)
Currently, my code is:
Match m = Regex.Match(givenString, "BEGINID:\"MyId\":(.*?)ENDID", RegexOptions.Singleline);
string output = m.Groups[1].Value;
then I split string output
by ,
character.
I want when I regex, I can get all these string I need, without use split, some thing like this pattern:
BEGINID:\"MyId\":(([^,]*,?)*?)ENDID
But I don't know how to do next. Can you tell me? Thank.
EDIT: I just edit my string, so it is general string, not a HTML string.