### RegEx pattern snippets ###################################################
### Duplicate Lines ###
(?x) # ignore whitespace
^ # start of line
( # group 1
.* # everything except line-break
)
( # group 2
\r?\n # line-break
\1 # recurse into group 1
)+
$ # end of line
### Individual Lines ###
(?x) # ignore whitespace
^ # start of line
.* # everything except line-break
$ # end of line