Regular Expression - Check if divisible by 0b101 (5)

This commit is contained in:
2017-08-19 15:45:52 +02:00
parent de94cb7ba3
commit 44f52e4467

View File

@@ -0,0 +1,4 @@
// Regular Expression - Check if divisible by 0b101 (5)
// https://www.codewars.com/kata/regular-expression-check-if-divisible-by-0b101-5/train/javascript
const solution = /^(?=.)(0|1(10)*(0|11)(01*01|01*00(10)*(0|11))*1)*$/;