diff -r a1544b804d1e -r 18bef085a7ca handouts/ho01.tex --- a/handouts/ho01.tex Fri Oct 10 16:59:22 2014 +0100 +++ b/handouts/ho01.tex Sat Oct 11 01:13:13 2014 +0100 @@ -17,14 +17,14 @@ \emph{not} just look for a particular string, but for string patterns. For example in programming code we need to identify what are the keywords, what are the identifiers etc. A pattern -for identifiers could be that they start with a letter, +for identifiers could be stated as: they start with a letter, followed by zero or more letters, numbers and the underscore. Also often we face the problem that we are given a string (for example some user input) and want to know whether it matches a particular pattern. In this way we can exclude user input that would otherwise have nasty effects on our program (crashing it or going into an infinite loop, if not worse). \defn{Regular -expressions} help with conveniently specifying such patterns. +expressions} help with conveniently specifying such patterns. The idea behind regular expressions is that they are a simple method for describing languages (or sets of strings)\ldots at least languages we are interested in in computer science. For