I am trying to write a program in python (brand new to Python) that would create a database of posts made to binary groups so the user can search for a certain file and have a nzb file returned. I am planning on using the XOVER command to get the list of posts and then dump those into a database. The part I am stuck at now is that some file posts consist of multiple parts as below (abbreviated XOVER reply)
1511156 As Requested 2000 adv server -2000AdvSrv.vol001+02.PAR2 (1/4) - 21/27 1511157 As Requested 2000 adv server -2000AdvSrv.vol001+02.PAR2 (2/4) - 21/27 1511158 As Requested 2000 adv server -2000AdvSrv.vol001+02.PAR2 (3/4) - 21/27 1511159 As Requested 2000 adv server -2000AdvSrv.vol001+02.PAR2 (4/4) - 21/27 I am trying to detect how many segments make up this post. One solution would be to look for (1/ in the subject string then find the denominator and loop thru as many times as the denominator to create the <segment> part of the nzb file. Is this the best way or is there an easier method? Also what would be the best way to search for the (1/ using string searches or RegExp? If REgExp could someone provide me with the RegExp for searching for this string? Thanks Salman -- http://mail.python.org/mailman/listinfo/python-list