2f7dd8b3-e022-40ba-95b6-322f7237cf9e
Pass lastIndex - 1 to lastIndexOf() when looking for the previous occurrence