ReplaceByRight and Search fixed, basic test passed