In article <4e7b8d7162steve.pampling@xxxxxxxxxxxxx>, Steven Pampling <steve.pampling@xxxxxxxxxxxxx> wrote: > On 25 Oct, Martin <freelists@xxxxxxxxxxxxxxxx> wrote: [Snip] > > I have also just put together a RegEx User Test which seems to work, > > but I am going to try and determine if it is worth 'Compiling' each > > expression once, rather than each time it is used (which could be > > quite a lot!). This would mean integrating it more into the main > > code. I also need to check which settings would be best to use. > > You are welcome to see my code as well - and use whichever bits are > > best. > No contest. > I surrender. > (I can carry on playing with the grammar check stuff) I did not mean to usurp your offer Steve! However, if you are working on something else, I am happy to work to propose a RegEx solution. Steve, can you please send me your RegEx code direct (martin at avisoft dot f9 dot co dot uk) - I am happy to take the best of both! > I will say though that if you time the test running against a sample > set of say 100 spam messages you will find the pattern compile each > time is wasteful on process time That was my suspicion > (and also can leak memory if you forget to null the pattern space as it > tends to use a new handle - of course if you want sloppy programming > I'm here) It can certainly provoke a myriad of Claims/Frees (and some extends) so a leak does not suprise me. > This is an instance where Dave Higtons pseudo-server comes in handy as > it simulates the slight delays in the header download that you don't > get from the testing feature. I have never played with that ... (fx sound of download> ... hmm ... looks as if it will take some working out how to use that! Any hints would be useful I think! Martin -- Martin Avison using a British Iyonix running RISC OS 5 and the Pluto mail and newsreader