As David said, if your example text is what you are working with, regex is probably overkill. However, if you are trying to use something simple to make it easier for you to break into regex, here is an example: http://backyard.homeunix.net/~ben/regex-example.c http://backyard.homeunix.net/~ben/regex-example.txt Ben