handouts/ho01.tex
changeset 554 2509c670e3a2
parent 553 3c040f4a7415
child 562 fa6d00968b0e
equal deleted inserted replaced
553:3c040f4a7415 554:2509c670e3a2
   179 
   179 
   180 \noindent Note also that the convention in Scala is that
   180 \noindent Note also that the convention in Scala is that
   181 \texttt{.r} converts a string into a regular expression. I
   181 \texttt{.r} converts a string into a regular expression. I
   182 leave it to you to ponder whether this regular expression
   182 leave it to you to ponder whether this regular expression
   183 really captures all possible web-addresses. If you need a quick
   183 really captures all possible web-addresses. If you need a quick
   184 recap about regular expressions, here is a quick video
   184 recap about regular expressions and how the match strings, 
       
   185 here is a quick video
   185 \url{https://youtu.be/bgBWp9EIlMM}.
   186 \url{https://youtu.be/bgBWp9EIlMM}.
   186 
   187 
   187 \subsection*{Why Study Regular Expressions?}
   188 \subsection*{Why Study Regular Expressions?}
   188 
   189 
   189 Regular expressions were introduced by Kleene in the 1950ies and they
   190 Regular expressions were introduced by Kleene in the 1950ies and they
   279 
   280 
   280 \begin{center}
   281 \begin{center}
   281 \url{http://davidvgalbraith.com/how-i-fixed-atom/}
   282 \url{http://davidvgalbraith.com/how-i-fixed-atom/}
   282 \end{center}
   283 \end{center}
   283 
   284 
       
   285 and when somebody tried to match web-addresses using regular
       
   286 expressions
       
   287 
       
   288 \begin{center}
       
   289 \url{https://www.tutorialdocs.com/article/regex-trap.html}
       
   290 \end{center}  
       
   291 
   284 \noindent
   292 \noindent
   285 Such troublesome regular expressions are sometimes called \emph{evil
   293 Such troublesome regular expressions are sometimes called \emph{evil
   286   regular expressions} because they have the potential to make regular
   294   regular expressions} because they have the potential to make regular
   287 expression matching engines to topple over, like in Python, Ruby and
   295 expression matching engines to topple over, like in Python, Ruby and
   288 Java. This ``toppling over'' is also sometimes called
   296 Java. This ``toppling over'' is also sometimes called