core: Remove substring.