Edit: Solution by @Heinzi https://stackoverflow.com/a/1731641/87698
I got two strings, for example someText-test-stringSomeMoreText?
and some kind of pattern string like this one {0}test-string{1}?
.
I'm trying to extract the substrings from the first string that match the position of the placeholders in the second string.
The resulting substrings should be: someText-
and SomeMoreText
.
I tried to extract with Regex.Split("someText-test-stringSomeMoreText?", "[.]*test-string[.]*\?"
. However this doesn't work.
I hope somebody has another idea...