Added string regions replace utility method (by offset).