Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Regexploit

A regexploit is a poorly built regex, which takes a long time to execute, even for small inputs. While the regex itself may actually provide valid features, its performances may degrade quickly as the size of the input grows, leading to a possible DDoS by keeping the server busy.

<?php
    
    //extracting version number 
    preg_match('(.+)\.(.+)\.(.+)', $string, $r);
    
?>

Documentation

See Also