More robust string matching 

- Javascript, I hate you.