lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I have a capture pattern problem:

   for page in string.gmatch(data, "^[\f]*[\f]+$") do
         pages[#pages + 1] = page
   end -- for

The "^[\f]*[\f]+$" is supposed to capture any/all up to a FormFeed (x'0c').
I am capturing nothing.  What have I done wrong?

I have tried many variations of this pattern to no avail.  The data is a
"print file" with form feeds at page end.  My goal is to capture the
individual pages into the "pages" table.  The entire file was read in via

I will appreciate any assistance.

CONFIDENTIALITY NOTICE:  This E-mail message and all attachments, which originated from Sealy Management Company Inc, are intended solely for the use of the intended recipient or entity and may contain legally privileged and confidential information.  If the reader of this message is not the intended recipient, you are hereby notified that any reading, disclosure, dissemination, distribution, copying or other use of this message is strictly prohibited.  If you have received this message in error, please notify the sender of the message immediately and delete this message and all attachments, including all copies or backups thereof, from your system.  You may also reach us by phone at 205-391-6000.  Thank you.