Solution for remove substring