问题
What I'm looking for is some library or some code of classes that can be used to expand construction strings into variations and permutations. Something like the following (syntax is mine, may be different):
construction string: [Ff]oo [Bbß]ar|F(oo|oe)
output strings:
Foo Bar
foo Bar
Foo bar
foo bar
Foo ßar
foo ßar
Foo
Foe
While it wouldn't be too hard to build this myself, if it's around, why bother reinventing the wheel?
回答1:
This doesn't follows your syntax, but I use it in some projects and runs very smooth: Permutations, Combinations, and Variations using C# Generics
来源:https://stackoverflow.com/questions/2065824/is-there-a-net-library-that-can-do-string-permutations-or-string-expansion