def replace_title(dir)
  regex =
    %r{(?:<h1 id="full_list_header">|<title>)([a-zA-Z ]+?)(?:</title>|</h1>)}

  Dir.glob("#{dir}/*.html") do |file|