Well, I was trying to use regular expressions in Python. I wrote a small script, so I thought I'll will post it and make it open for discussion. As I learn more I'll keep them posted too, and if anyone has any comments please do let me know. Code: #!/usr/bin/python import re print "Content-Type: text/html\n\n" regx = re.compile(r"([A-C])([a-x])?") # Should match either A,B or C, and another character between a-x after tht sTest = "An Apple A Day Keeps The Doctor Away from Vitamin C" print "Trying a match..<br/>" oMatches = regx.match(sTest) if not oMatches: print "There were no matches" else: for k, grp in enumerate(oMatches.groups()): print "Group %d matched %r<br/>" % (k+1, grp)