handles backspaces (sloppily, need proper parser); input is cleared after ever replace.