I have the following string:
root.single_product.baby->teenager_furn.others.
I want to extract each string in front of the .-sign. I have came up with this:
Regex.Matches("root.single_product.baby->teenager_furn.others.", @"([\w]+)");
This gives me the following list:
root
single_product
baby
teenager_furn
others
But I want the following instead:
root
single_product
baby->teenager_furn
others
How can I accomplish this?
Regex.Splitor the normalstring.Splitfunction.\.forRegex.Splitor just the character.forstring.Split