titles = ["Morning Glory", "Red", "Skyline", "The Next Three Days"] titles.sort_by {|w| w.sub(/^the /i,"")} => ["Morning Glory", "The Next Three Days", "Red", "Skyline"]