// @nuget: Sprache -version 2.3.1
//https://stackoverflow.com/questions/51231883/sprache-cannot-recognise-this-sequence/70297981
using Sprache;
using System;
using System.Linq;
public class Program
{
public static void Main()
var text = "a11a11a";
var n = text.Length;
var grammer =
from open in Parse.Letter.Once()
from content in Parse.LetterOrDigit.Repeat(n - 2)
from close in Parse.Letter.Once()
select open.Concat(content).Concat(close);
var result= grammer.Parse(text);
foreach (char c in result)
Console.WriteLine(c);
}