# Set the path to the file you want to check $file = "C:\Users\a.warme\Documents\nps_cleanup\apworkfile2.txt" # Define a regular expression to search for common mistakes $regex = '\s+$|(?