Re: Enhancement Request: Folding Whitespace
Ger Hobbelt <[email protected]> Fri, 26 Jun 2009 20:22:47 +0200
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
I hear you. ;-) But from the sound of it, mixed with my personal flavouritism, it seems you'd like to have two different bits: whitespace /stripping/ at SOL/EOL/both (so that you don't have to say '^[[:space:]]+' but just '^') and whitespace treatments, where LF is (maybe) not part of said whitespace, i.e. '[[:space:]]+' becomes just ' '. That could be handled by a couple of lines of replacement instructions (been out of crm114 scripting for ~ 2 months and I already forgot what the instruction opcode for 'find&replace' is :-( ) or by some sort of new transmogrification feature to be. Bets are up on what Bill's going to choose there, but last time I checked my bookie the odds for new opcode/feature/gadget(tm) were like on that horse Molly No Show (or was it Mally No Show. Ah, what the heck.) BTW, had a quick gander at your URLs; /index.html turns up empty; /includes/master.html shows several :*:xyz: variable literals, so I take it Mr. A.Z.Kikr is in between bottom actions? ;-) Viewed with FF3.0.11 on a WinXP system from somewhere in the Dutch Lands. Cheers, Ger On Mon, Jun 22, 2009 at 7:56 AM, Chris Babcock<[email protected]> wrote: > I have no idea why I expected this feature - I probably just burned a > bit of common sense wrapping my mind around the email RFCs when I was > working on the mime filters - but folding white space would be NiceTM > for those long regexps that I should break down into simpler > expressions anyhow. I just spent way too much time debugging this: > > # Some other code > { > match <nomultiline> [::*:game_current:_record:] (:tmp:)\ > /^([[:graph:]]+[[:space:]]+){4}:*:uid:[[:space:]]+[[:graph:]]+\ > [[:space:]]+:*:CGIV_password:[[:space:]]+:*:CGIV_email:/ > # Do something > } > . . . > > The problem being that I naively expected the whitespace at the > beginning of a line after "\" to go away like it would in email > headers. > > Silly old bear. > > --- end muse --- > > BTW... Use case for CRM as a CGI scripting Language: > > http://usak.asciiking.com/index.html > > Compare to: > http://usak.asciiking.com/content/index.html > http://usak.asciiking.com/content/includes/master.html > http://usak.asciiking.com/content/includes/left_menu > > The content directory is a soft link to public_html. If a file is > accessed via a "content" URL it is served raw, otherwise it is handled > by a script that inserts the body of the source html file as a content > div in the master page. This provides a single point of maintenance for > site navigation and a meme for different data presentations (like AJAX) > in the future. > > The excuse for using CRM in this case is that the app serves data from > text files maintained by a legacy application. There is a role for CRM > classifiers in Spam filtering and analyzing logs in the future, but for > now it's a fast and fun way to do Controllable Regex Mutilations. > > Chris > > > ------------------------------------------------------------------------------ > Are you an open source citizen? Join us for the Open Source Bridge conference! > Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. > Need another reason to go? 24-hour hacker lounge. Register today! > http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org > _______________________________________________ > Crm114-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/crm114-general > > -- Met vriendelijke groeten / Best regards, Ger Hobbelt -------------------------------------------------- web: http://www.hobbelt.com/ http://www.hebbut.net/ mail: [email protected] mobile: +31-6-11 120 978 -------------------------------------------------- ------------------------------------------------------------------------------