Greed(y matching) is not good
Jul. 18th, 2007 02:06 pmContrary to the the movie Wall Street, Greed is NOT good. Am reworking some web pages for my volunteer web mastering, and have been using Regex based search and replace to strip out tags. This has been going very well. Today, I was looking at a page, and lots of tags and other stuff were just gone. After puzzling over it for a bit, I realized that I had sloppily used greedy matching where I should not have, and stripped out much more than I had intended. I should know better. Fortunately, I caught it before putting the page up.