equal
deleted
inserted
replaced
102 regular expressions. For example we will write $(r_1 + r_2)^*$, which is different from $r_1 + (r_2)^*$. |
102 regular expressions. For example we will write $(r_1 + r_2)^*$, which is different from $r_1 + (r_2)^*$. |
103 The former means roughly zero or more times $r_1$ or $r_2$, while the latter means $r_1$ or zero or more times |
103 The former means roughly zero or more times $r_1$ or $r_2$, while the latter means $r_1$ or zero or more times |
104 $r_2$. We should also write $(r_1 + r_2) + r_3$ which is a regular expression different from $r_1 + (r_2 + r_3)$, |
104 $r_2$. We should also write $(r_1 + r_2) + r_3$ which is a regular expression different from $r_1 + (r_2 + r_3)$, |
105 but in case of $+$ and $\cdot$ we actually do not care and just write $r_1 + r_2 + r_3$, or $r_1 \cdot r_2 \cdot r_3$, |
105 but in case of $+$ and $\cdot$ we actually do not care and just write $r_1 + r_2 + r_3$, or $r_1 \cdot r_2 \cdot r_3$, |
106 respectively. The reasons for this will become clear shortly. In the literature you will often find that the choice |
106 respectively. The reasons for this will become clear shortly. In the literature you will often find that the choice |
107 $r_1 + r_2$ is written as $r_1\mid{}r_2$ |
107 $r_1 + r_2$ is written as $r_1\mid{}r_2$. In case of $\cdot$ we will even often omit it all together. For example |
|
108 the regular expression for email addresses is meant to be of the form |
|
109 |
|
110 \[ |
|
111 ([\ldots])^+ \cdot @ \cdot ([\ldots])^+ \cdot . \cdot \ldots |
|
112 \] |
|
113 |
|
114 \noindent |
|
115 meaning first comes a name (specified by the regular expression $([\ldots])^+$), then an $@$-sign, then |
|
116 a domain name (specified by the regular expression $([\ldots])^+$), then a top-level domain. |
|
117 |
|
118 |
108 \end{document} |
119 \end{document} |
109 |
120 |
110 %%% Local Variables: |
121 %%% Local Variables: |
111 %%% mode: latex |
122 %%% mode: latex |
112 %%% TeX-master: t |
123 %%% TeX-master: t |