I got an email from somebody named Lindrian about the article I had written about using regular expressions to find comments in source code.
Regular Expressions
Many text editors have advanced find (and replace) features. I recently wrote an article about finding C style comments in source code. A similar technique can be used to find comments in HTML files.
Many text editors have advanced find (and replace) features. When I'm programming, I like to use an editor with regular expression search and replace. This feature is allows one to find text based on complex patterns rather than based just on literals. Upon occasion I want to examine each of the comments in my source code and either edit them or remove them. I found that it was difficult to write a regular expression that would find C style comments (the comments that start with /* and end with */) because my text editor does not implement the "non-greedy matching" feature of regular expressions.