--- In [email protected], "entropyreduction" <alancampbelllists+ya...@...> wrote: > > Okay, I give in, what does PCRE_PARTIAL_HARD vs PCRE_PARTIAL_SOFT do? >
hard stops as soon as it sees a partial match, soft keeps trying alternatives after seeing a potential match. Partial_hard is supposed to make PCRE more useful for searching in text streams than partial_soft. Also the pending modifications will make all patterns compatible with both partial options. Previously patterns that used certain repeats together with the partial option returned the error PCRE_ERROR_BADPARTIAL. As I understand it, using the pattern ?"JohnBoy|John", to match the subject "John" with partial_Hard option set, exec will return PCRE_ERROR_PARTIAL together with the offsets. Given the same subject and pattern with partial_Soft it will keep searching alternatives after seeing the partial match and in this case will find a complete match, thus giving a different status result than partial_Hard. > [...] might as well add option keywords "partial_soft", > "partial_hard"...or, I seem to remember you have a distaste for > underscore..."hard", "soft"? I think partial_soft and partial_hard would be fine for this. Regards, Sheri
