Skip to main content
6 of 8
deleted 208 characters in body
Leaky Nun
  • 50.1k
  • 6
  • 110
  • 284

#Retina, 62 43 26 bytes

17 bytes thanks to @Martin Büttner.

^
1111:
M!&`(11+):(\1*)
:

(Note the trailing newline.)

Try it online!

Input in unary in 1, output in unary in 1 separated by newlines.

##Previous 43-byte version:

.+
11:$&;111:$&;1111:$&
\b(1+):(\1*)1*
$1$2

Try it online!

Input in unary, output in unary separated by semi-colon (;).

##Previous 62-byte version:

.+
$&11;$&111;$&1111
((11)+)1*;((111)+)1*;((1111)+)1*
$1;$3;$5

Try it online!

Input in unary, output in unary separated by semi-colon (;).

Leaky Nun
  • 50.1k
  • 6
  • 110
  • 284