I have this code that successfully checks if a string has a character in the middle of the string but not in the beginning or in the end. My regex though return all the string t