oes anyone know where i could find some information
:about parsing NNTP subject fields?
suedo Code and/or RegExp advise would be ideal.
:Im looking to parse out multipart messages.
:ie: Test Subject (1/1) - file.bin [01/10]
: Another test.bin (1/2)
:Then store them untill all the parts have been gathered.
There is no standard formatting for multipart messages.
Nod the standard gives alot of freedom to the poster.
When I did this a couple of years ago, I had to just look to see what
was coming down and tweak it from time to time. As I recall, there were
some complications involving pasting the binaries back together again
automatically, due to the different ways that posters had of storing
the binaries. And there are complications around detecting duplicates
because people tend to use similar subjects for different binaries.
I probably still have the code around. I haven't looked at it in
years. It's probably not my best code, but it worked.
I am very happy to hear from someone who has experience with
this sort of function, you help is really helpfull.. thank you.
Here is the regex im thinking about using:
m/(.+)([(\[\{]+?\d+[/-]+?(\d+)[)\]\}]+?)/
Dose this regex look ok?
There are three memory groups
1) the main subject text
2) the proof that this is part of a multi-part message
3) the number of parts for this message
Im planning on creating a hash which has the message-ids for keys
and an array ref as a value, the actual array may contain the total number
of parts expected, and which part that this message id is.
if this regex is ok, I will still need to find a way to know when all parts have
been gathered, then pass the message id's in the correct order to the hash
which populates the Tk::HList, which displays the messages.
Then if the message is selected for download i will pass the message-ids to..
Convert-BulkDecoder
Im still trying to get my head around this.. more to follow (hopefully)
Help would be greatly appreciated.
Thanks in advance for any tips/suggestions/psudo code/regex advice.