> Regular Expressions are your freind. Take a peek at the re module. I couldn't agree more. If you do string manipulations such as these even on an occasional basis, learning the re module will pay great dividends over the long haul.