Finite Automata and Regular Expressions - .NET port of dk.brics.automaton.
C# XSLT PowerShell Shell

Fare - [F]inite [A]utomata and [R]egular [E]xpressions

Project Fare is an effort to bring a DFA/NFA (finite-state automata) implementation from Java to .NET. There are quite a few implementations available in other languages today. This project aims to fill the gap in .NET.

Fare is a .NET port of the well established Java library dk.brics.automaton with API as close as possible to the corresponding dk.brics.automaton classes.

Development environment

  • Microsoft Visual Studio 2010
    • .NET Framework 3.5
  • ReSharper 6.0 Build 6.0.2202.688
  • StyleCop
  • AutoFixture 2.4.1
    • data theories

Design changes

  • Included a .NET port of Xeger, for generating random text from regular expressions. Xeger does not support all valid Java regular expressions. The full set of what is defined here and is summarized at (
  • Implemented object equality.
  • Many getters and setters have been replaced by .NET properties.
  • Many foreach loops have been converted to LINQ-expressions.
  • Notes from porting Java code in .NET can be found here.

Based on version 1.11-8 of dk.brics.automaton released on September 7, 2011. ChangeLog

NuGet package

Fare is available via NuGet.


Fare reached version 1 without following a particular versioning scheme. From version 1 and above, Fare follows Semantic Versioning 2.0.0.

Which projects use Fare?

Fare is used in: