Skip to content

A lightweight library for performing brace expansion in .NET

License

Notifications You must be signed in to change notification settings

lpreiner/BraceExpander

Repository files navigation

NuGet Package NuGet

BraceExpander

A lightweight library for performing brace expansion in .NET

Getting Started

Install-Package BraceExpander

Usage Examples

Basic Usage

using BraceExpander;

var results = Expander.Expand("part.{01..3}");
// [part.01, part.02, part.03]

Numeric Sequence

var results = Expander.Expand("{1..5}");
// [1, 2, 3, 4, 5]

Alpha Sequence

var results = Expander.Expand("{a..g}");
// [a, b, c, d, e, f, g]

Custom Increment

var results = Expander.Expand("{0..10..2}");
// [0, 2, 4, 6, 8, 10]

Set Expansion

var results = Expander.Expand("a{1,2,3}");
// [a1, a2, a3]

Nested Expansions

var results = Expander.Expand("{{{{a,b},c,{d..f}},g},h}");
// [a, b, c, d, e, f, g, h]

About

A lightweight library for performing brace expansion in .NET

Resources

License

Stars

Watchers

Forks

Languages