DEV Community

Discussion on: Challenge: Write a program that never stops

Collapse
 
_bigblind profile image
Frederik 👨‍💻➡️🌐 Creemers

his technically doesn't run forever, but takes longer than you'd expect:

Python:

import re

exp = re.compile("a(b|c+)*d")
exp.match("a" + "c"*100)
Collapse
 
r0f1 profile image
Florian Rohrer