Simple real-time constant-space string matching