D
Dave Rose
i have a regexp: /(^BillHead(.*))(^Bill_End(.*))/m that's too greedy for
processing
a billing extract file containing:
BillHead...<<<much information here>>\n
<<one or more detail lines here\n>>
Bill_End...<<<much information here>>\n
BillHead...<<<much information here>>\n
<<one or more detail lines here\n>>
Bill_End...<<<much information here>>\n
...etc.... to EOF....
..i get the whole file matched....i just want each invoice...
it will eventually be in a oneliner like
a=File.read("billfile").scan(regexp)
so what is the non-greedy way for the above regexp to properly match
each invoice...
processing
a billing extract file containing:
BillHead...<<<much information here>>\n
<<one or more detail lines here\n>>
Bill_End...<<<much information here>>\n
BillHead...<<<much information here>>\n
<<one or more detail lines here\n>>
Bill_End...<<<much information here>>\n
...etc.... to EOF....
..i get the whole file matched....i just want each invoice...
it will eventually be in a oneliner like
a=File.read("billfile").scan(regexp)
so what is the non-greedy way for the above regexp to properly match
each invoice...