I am trying to figure out the simplest way to do this using a regular expression.
- Three symbols a, b, c.
- The sequence length is unlimited, i.e. *.
- The symbol a must be somewhere in the sequence at least once, but can appear more than once.
- The sequence may have only a.
More formally, $\{ w \in \{a,b,c\}^* ~|~ \#_a(w)\ge 1 \}$, where $\#_a(w)$ is the number of $a$s in $w$.
The best I get is
$( ( b \mid c )^*\, a\, ( b \mid c )^* )^+$
Is that the simplest way?