javascript string and errors
ammount of capture groups fixed