Пример #1
0
        internal static Pattern getRegularExpressionPattern()
        {
            Pattern quote  = IsChar('/');
            Pattern escape = IsChar('\\').Seq(Patterns.HasAtLeast(1));

            char[]  not_allowed = new char[] { '/', '\n', '\r', '\\' };
            Pattern content     = Patterns.Or(escape, Patterns.NotAmong(not_allowed));

            return(quote.Seq(content.Many()).Seq(quote));
        }