simplify a regex to reduce recursion -
i have regex this:
/^from: ((?!\n\n).)*\nsubject:.+/msu with point of matching block looks this:
from: john smith cc: jane smith subject: cat videos (ie- they're in contiguous block) not if there blank line breaking block, this:
from: john smith  subject: cat videos but i've been finding php script uses segfaulting.  able mitigate segfaults setting pcre.recursion_limit lower number (i used 8000), occurs me i'm trying should doable without great deal of recursion.  using horribly inefficient method of catching \n\n ?
i use "not newline":
/^from:[^\n]*\nsubject:.+/msu 
Comments
Post a Comment