Version 6 of Answered Questions On: Regular Expressions

Updated 2004-10-28 16:29:06

EDIT/RECENT CHANGES


NAVIGATION


TABLE OF CONTENTS (Regular Expressions):


I'm having problems with CRCs. I have tried the tcclib 1.5 crc32 as well as the Trf method. Both barf when I try to generate a CRC from a file which starts with two dashes. When it hits one of those files, it tries to interpret the text as parameters to the crc-zlib call.

 set chunkHandle [open "$fname" r]
 set chunkData [read $chunkHandle]
 close $chunkHandle
 set chk [crc-zlib $chunkData]
 set crc [hex -mode encode -- $chk]

 /Users/bruceaxt/Documents/BrainBucket/arrival_notification.exw
 crc-zlib: wrong # args, all options require an argument while executing
 "crc-zlib $chunkData"

Arrival_notification.exw is Euphoria source code and starts with the line "--with trace" (which, for those in the know, means that the "with trace" command has been commented out.)

Thanks, Bruce BMA

AK: Trf accepts the '--' option to terminate option processing. So [crc-zlib -- $chunkData] should work.