MarkdownSharp.Markdown.GetNestedParensPattern C# (CSharp) Méthode

GetNestedParensPattern() private static méthode

Reusable pattern to match balanced (parens). See Friedl's "Mastering Regular Expressions", 2nd Ed., pp. 328-331.
private static GetNestedParensPattern ( ) : string
Résultat string
        private static string GetNestedParensPattern()
        {
            // in other words (this) and (this(also)) and (this(also(too)))
            // up to _nestDepth
            if (_nestedParensPattern == null)
                _nestedParensPattern =
                    RepeatString(@"
                    (?>              # Atomic matching
                       [^()\s]+      # Anything other than parens or whitespace
                     |
                       \(
                           ", _nestDepth) + RepeatString(
                    @" \)
                    )*"
                    , _nestDepth);
            return _nestedParensPattern;
        }