Group cs(?<cs> \# (cs|comments-start) .* \n ) \#the literal # (3510 / 438 / 2316)
Group 2(cs|comments-start) csthe literal text cs (case insensitive) 2nd Alternativecomments-start comments-startthe literal text comments-start (case insensitive) .*any character (except for line terminators), repeated any number of times
\na line-feed (newline) character (ASCII 10)
Comment: comments-start Zeile
Group ce(?<ce> \# (ce|comments-end) .* \n ) \#the literal # (3510 / 438 / 2316)
cethe literal text ce (case insensitive) 2nd Alternativecomments-end comments-endthe literal text comments-end (case insensitive) .*any character (except for line terminators), repeated any number of times
\na line-feed (newline) character (ASCII 10)
Comment: comments-end Zeile
Group hashLine(?<hashLine> \# (?! (cs|ce|comments-start|comments-end) ) .* \n ) \#the literal # (3510 / 438 / 2316)
Negative Lookahead(?! (cs|ce|comments-start|comments-end) ) Group 6(cs|ce|comments-start|comments-end) csthe literal text cs (case insensitive) cethe literal text ce (case insensitive) 3rd Alternativecomments-start comments-startthe literal text comments-start (case insensitive) 4th Alternativecomments-end comments-endthe literal text comments-end (case insensitive) .*any character (except for line terminators), repeated any number of times
\na line-feed (newline) character (ASCII 10)
Comment: Zeile, beginnt mit Hash, k. Komm.
Group noHashLine(?<noHashLine> [^#] .* \n ) Negated Character Class[^#] #the literal # (3510 / 438 / 2316)
.*any character (except for line terminators), repeated any number of times
\na line-feed (newline) character (ASCII 10)
Comment: Zeile, beginnt nicht mit Hash
Group commentBlock(?<commentBlock>
(?&cs) # Comment Block Start
(?| # es darf folgen:
( (?&noHashLine) # Zeile ohne Hash am Anfang
| (?&hashLine) # oder Zeile mit Hash am Anfang aber nicht #cs/#ce
)* # diese Zeilen können 0 bis beliebig oft auftreten ..
(?&ce) # .. und werden mit einer #ce-Zeile beendet ..
| (?&commentBlock) # oder es folgt ein verschachtelter Commentblock
)*
) (?&cs)calls group cs as a subroutine
Comment: Comment Block Start
Branch Reset Group(?| # es darf folgen:
( (?&noHashLine) # Zeile ohne Hash am Anfang
| (?&hashLine) # oder Zeile mit Hash am Anfang aber nicht #cs/#ce
)* # diese Zeilen können 0 bis beliebig oft auftreten ..
(?&ce) # .. und werden mit einer #ce-Zeile beendet ..
| (?&commentBlock) # oder es folgt ein verschachtelter Commentblock
)* *repeats the group contents below any number of times:
1st Alternative # es darf folgen:
( (?&noHashLine) # Zeile ohne Hash am Anfang
| (?&hashLine) # oder Zeile mit Hash am Anfang aber nicht #cs/#ce
)* # diese Zeilen können 0 bis beliebig oft auftreten ..
(?&ce) # .. und werden mit einer #ce-Zeile beendet ..
Comment: es darf folgen:
Group 9( (?&noHashLine) # Zeile ohne Hash am Anfang
| (?&hashLine) # oder Zeile mit Hash am Anfang aber nicht #cs/#ce
)* *repeats the group contents below any number of times:
1st Alternative (?&noHashLine) # Zeile ohne Hash am Anfang
(?&noHashLine)calls group noHashLine as a subroutine
Comment: Zeile ohne Hash am Anfang
2nd Alternative (?&hashLine) # oder Zeile mit Hash am Anfang aber nicht #cs/#ce
(?&hashLine)calls group hashLine as a subroutine
Comment: oder Zeile mit Hash am Anfang aber nicht #cs/#ce
Comment: diese Zeilen können 0 bis beliebig oft auftreten ..
(?&ce)calls group ce as a subroutine
Comment: .. und werden mit einer #ce-Zeile beendet ..
2nd Alternative (?&commentBlock) # oder es folgt ein verschachtelter Commentblock