You can find lines in which the a appears only twice or four times.
- a
- aa
- aaa
- aaaa
- aaaaa
^aa|aaaa$ does not work, because ^aa matches aaa. aaa also starts with aa. This is why both ^ and $ must be used twice in the expression.
Next StepYou can find lines in which the a appears only twice or four times.
^aa|aaaa$ does not work, because ^aa matches aaa. aaa also starts with aa. This is why both ^ and $ must be used twice in the expression.
Next Step