FWIW, this was my test script (5 lines, Yahoo will break them). It
failed partway into the file last night and this morning, but now it
works every time.

local
mypattern=?"(?<=\r\n\r\n|\A)([^\r\n]+)\r\n([^\r\n]+)\r\n([^\r\n]+)\r\n([^\r\n]+)(?=(\r\n\r\n)|\Z)"

local myreplace="<div
class=\x22list\x22>\r\n\t<h3>"++?"\1"++"</h3>\r\n\t<h4>"++?"\2"++"</h4>\r\n\t<p>"++?"\3"++"</p>\r\n\t<p
class=\x22m1\x22>"++?"\4"++"</p>\r\n</div>"

local mystring=file.readall(pprofolder++?"scripts\regextext.txt")

local repret=regex.replaceg(mystring, mypattern, myreplace,"rx2output")

file.writeall(pprofolder++?"scripts\regextestout.txt",rx2output++"\r\n\r\npproversion
"++pproversion++" regexplugin "++regex.version++" pcre version
"++regex.pcreversion++"\r\n")

Test data looked like this:

Category 1

Item a1
Item a2
Item a3
Item a4

Item b1
Item b2
Item b3
Item b4

Category 2

Item c1
Item c2
Item c3
Item c4

Item d1
Item d2
Item d3
Item d4

(initially duped to Category 194, now duped up to Category 388)

Reply via email to