Skip to main content
added 35 characters in body
Source Link
math scat
  • 9.5k
  • 1
  • 20
  • 83

Pip, 87 bytes

-1 byte by jezza_99 / DLosc

aR`0+`#_aR+X0#_

Wow pip is really good at regex

Try It Online!

aR`0+`#_aR+X0#_
aR`0+`aR+X0     Replace all occurrences of consecutive(regexified zeros
zero with a +)
     #_   with it's length

Pip, 8 bytes

aR`0+`#_

Wow pip is really good at regex

Try It Online!

aR`0+`#_
aR`0+`     Replace all occurrences of consecutive zeros
      #_   with it's length

Pip, 7 bytes

-1 byte by jezza_99 / DLosc

aR+X0#_

Wow pip is really good at regex

Try It Online!

aR+X0#_
aR+X0     Replace all occurrences of (regexified zero with a +)
     #_   with it's length
added 108 characters in body
Source Link
math scat
  • 9.5k
  • 1
  • 20
  • 83

Pip, 8 bytes

aR`0+`#_

Wow pip is really good at regex

Try It Online!

aR`0+`#_
aR`0+`     Replace all occurrences of consecutive zeros
      #_   with it's length

Pip, 8 bytes

aR`0+`#_

Wow pip is really good at regex

Try It Online!

Pip, 8 bytes

aR`0+`#_

Wow pip is really good at regex

Try It Online!

aR`0+`#_
aR`0+`     Replace all occurrences of consecutive zeros
      #_   with it's length
Source Link
math scat
  • 9.5k
  • 1
  • 20
  • 83

Pip, 8 bytes

aR`0+`#_

Wow pip is really good at regex

Try It Online!