From: "phil.swenson@..." Date: 2007-04-04T00:50:09+09:00 Subject: search a file and replace text I need to search a specific xml file in a directory, look for: 30890 and if the port 30890 is still there replace it with a different integer. I know of several ways to do this (like open the file, iterate the lines until I find the integer, do a gsub! on on the integer). But it seems like there might be a better way to do it. Is there a search and replace API I don't know about? Any thoughts?