bsc-projects-13.html
changeset 242 ea17aab7cea6
parent 241 250618d1b355
child 243 d24749d0282d
equal deleted inserted replaced
241:250618d1b355 242:ea17aab7cea6
    62   <p>The background for this project is that some regular expressions are 
    62   <p>The background for this project is that some regular expressions are 
    63   &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
    63   &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
    64   and can &ldquo;stab you in the back&rdquo; according to
    64   and can &ldquo;stab you in the back&rdquo; according to
    65   this <A HREF="http://tech.blog.cueup.com/regular-expressions-will-stab-you-in-the-back">blog post</A>.
    65   this <A HREF="http://tech.blog.cueup.com/regular-expressions-will-stab-you-in-the-back">blog post</A>.
    66   For example, if you use in <A HREF="http://www.python.org">Python</A> or 
    66   For example, if you use in <A HREF="http://www.python.org">Python</A> or 
    67   in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (probably also in other mainstream programming languages) the 
    67   in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (probably also other mainstream programming languages) the 
    68   innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string 
    68   innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string 
    69   <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact,
    69   <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact,
    70   Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself:
    70   Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself:
    71   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re.py">re.py</A> (Python version) and 
    71   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re.py">re.py</A> (Python version) and 
    72   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re-internal.rb">re.rb</A> 
    72   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re-internal.rb">re.rb</A> 
   551 </TD>
   551 </TD>
   552 </TR>
   552 </TR>
   553 </TABLE>
   553 </TABLE>
   554 
   554 
   555 <P>
   555 <P>
   556 <!-- hhmts start --> Last modified: Mon Oct  7 15:42:25 BST 2013 <!-- hhmts end -->
   556 <!-- hhmts start --> Last modified: Mon Oct  7 15:44:19 BST 2013 <!-- hhmts end -->
   557 <a href="http://validator.w3.org/check/referer">[Validate this page.]</a>
   557 <a href="http://validator.w3.org/check/referer">[Validate this page.]</a>
   558 </BODY>
   558 </BODY>
   559 </HTML>
   559 </HTML>