STRING MATCHING WITH WEIGHTED ERRORS