The regular expression you need is pretty simple:
101010|101(0|1)*01010 (theoretical)
or
^101010|101[01]*01010$ (used in most programming languages)
which means either:
- Match 1, 0, 1, 0, 1, 0
or
- Match 1, 0, and 1.
- Keep matching 0 or 1, zero or more times.
- Match 0, 1, 0, 1, 0.
The following non-deterministic automata should work: