...and, just as a side point, let me say this: if anyone reading this thread is (or should be) considered a "newbie", then you would do well to learn (via which, you will learn to love) regular expressions...
Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.