NODE EXPLANATION
--------------------------------------------------------------------------------
^ the beginning of the string
--------------------------------------------------------------------------------
( group and capture to \1 (between 1 and 4
times (matching the most amount
possible)):
--------------------------------------------------------------------------------
1+ '1' (1 or more times (matching the most
amount possible))
--------------------------------------------------------------------------------
){1,4} end of \1 (NOTE: because you are using a
quantifier on this capture, only the LAST
repetition of the captured pattern will be
stored in \1)
--------------------------------------------------------------------------------
$ before an optional \n, and the end of the
string