p = re.compile("((?<=\\s)\\'([^\\']+)\\'(?=\\s))")
test_str = (
    "I'm one of the persons' stackoverflow don't th'em said, 'hey what' I'll handle it."
    )
Replace single quotes with double with exclusion of some elements