|
|
The unary postfix operators ? and + do not allow us to define additional languages, but they often make it easier to express languages.
R? stands for
| R
R+ stands for L(R)
L(RR)
L(RRR) ...
Examples:
% grep '.*dous' words # false, why? % grep '^.*dous$' words hazardous horrendous stupendous tremendous
% grep '^[^x]*x[^x]*x[^x]*' words executrix Exxon xerox
% egrep '^.*[xyz][^xyz][xyz][^xyz].*' words bryozoa oxeye polygynous Polyhymnia polytypy zazen
)) followed by a consonante (
)
followed by
followed by
followed by
.
% grep '^.*\([aeiou]\)\([^aeiou]\)\1\2\1.*' words banana homomorphic homomorphism prosopopoeia rococo Tananarive
% grep '^.*s[^s]*u[^su]*n[^sun]*y[^suny]*' words sanguinary scrutiny simultaneity substitutionary sundry sunny superlunary supplementary suzerainty
% egrep '(aa|bb)(e|o)(c|d)' words Lubbock
|
|
Last modified: 27/July/98 (12:14)