Ok let's say I have an ObservableCollection<string>
object. Within this object I have a variety of strings:
SomeString01
SomeString-02
somestring-03
SOMESTRING.04
aString
I want to take an input, we'll call it pattern
and store it as a string from a User interface, and do some partial matching on the ObservableCollection
. I need do to partial matching on the collection, and everything is going to be case insensitive. In the end I want to these compiled into a brand new ObservableCollection
. So here are some example cases:
pattern = "SoME"
// RESULTS:
SomeString01
SomeString-02
somestring-03
SOMESTRING.04
/* --- */
pattern = "-0"
// RESULTS:
SomeString-02
somestring-03
/* --- */
pattern = "ING0"
// RESULTS:
SomeString01
pattern = "s"
// RESULTS:
SomeString01
SomeString-02
somestring-03
SOMESTRING.04
aString
What is the best approach for this in a ClickOnce application?