Skip to main content
added 17 characters in body
Source Link
DJMcMayhem
  • 60.1k
  • 18
  • 203
  • 352

V (vim), 7 bytes

Óˆ± ø^$ 

Try it online! or Verify test casesVerify test cases

Hexdump:

00000000: d388 b10a d85e 24 .....^$ 

Just two regexes. Explanation:

Ó " Remove all occurrences... ˆ " Any character ± " Followed by itself " This regex is actually just the compressed form of (.)\1 ø " Count the number of matches ^$ " An empty line 

V (vim), 7 bytes

Óˆ± ø^$ 

Try it online! or Verify test cases

Hexdump:

00000000: d388 b10a d85e 24 .....^$ 

Just two regexes. Explanation:

Ó " Remove all occurrences... ˆ " Any character ± " Followed by itself " This regex is actually just the compressed form of (.)\1 ø " Count the number of matches ^$ " An empty line 

V (vim), 7 bytes

Óˆ± ø^$ 

Try it online! or Verify test cases

Hexdump:

00000000: d388 b10a d85e 24 .....^$ 

Just two regexes. Explanation:

Ó " Remove all occurrences... ˆ " Any character ± " Followed by itself " This regex is actually just the compressed form of (.)\1 ø " Count the number of matches ^$ " An empty line 
added 146 characters in body
Source Link
DJMcMayhem
  • 60.1k
  • 18
  • 203
  • 352

V (vim), 7 bytes

Óˆ± Ø^$ø^$ 

Try it online!Try it online! or Verify test cases

Hexdump:

00000000: d388 b10a d85e 24 .....^$ 

Just two regexes. Explanation:

Ó " Remove all occurrences... ˆ " Any character ± " Followed by itself " This regex is actually just the compressed form of (.)\1 Øø " Count the number of matches ^$ " An empty line 

V (vim), 7 bytes

Óˆ± Ø^$ 

Try it online! or Verify test cases

Hexdump:

00000000: d388 b10a d85e 24 .....^$ 

Just two regexes. Explanation:

Ó " Remove all occurrences... ˆ " Any character ± " Followed by itself " This regex is actually just the compressed form of (.)\1 Ø " Count the number of matches ^$ " An empty line 

V (vim), 7 bytes

Óˆ± ø^$ 

Try it online! or Verify test cases

Hexdump:

00000000: d388 b10a d85e 24 .....^$ 

Just two regexes. Explanation:

Ó " Remove all occurrences... ˆ " Any character ± " Followed by itself " This regex is actually just the compressed form of (.)\1 ø " Count the number of matches ^$ " An empty line 
Source Link
DJMcMayhem
  • 60.1k
  • 18
  • 203
  • 352

V (vim), 7 bytes

Óˆ± Ø^$ 

Try it online! or Verify test cases

Hexdump:

00000000: d388 b10a d85e 24 .....^$ 

Just two regexes. Explanation:

Ó " Remove all occurrences... ˆ " Any character ± " Followed by itself " This regex is actually just the compressed form of (.)\1 Ø " Count the number of matches ^$ " An empty line