in reply to Whats your favorite nonstandard regex quote char?
Like The Mad Hatter, I favour the pipe.
s|{.*?}|{$sub[$n++]}|g;
It has good visibility, is simple, yaddax3. I toyed around with using #, and it works well as a visual cue, because it registers as 'dark' among visually 'lighter' characters. But accidental obfuscation, as well as inadequate editor syntax hilighting, made me drop that.
I'm not especially fond of ,.`"', because I like for the whole height of the line to be covered. Makes the character look more like a delimiter. Paired delimiters such as []{}()<> do that, but I can't get used to them. They make a lot of sense, and can make certain regexps nice and tidy... but even on multiline things I like my pipe:
s| {.*?} | {$sub[$n++]} |gx;
LAI
__END__
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Whats your favorite nonstandard regex quote char?
by Enlil (Parson) on Apr 22, 2003 at 17:36 UTC | |
by LAI (Hermit) on Apr 23, 2003 at 14:08 UTC | |
Re:x2 Whats your favorite nonstandard regex quote char? (paired delimiters)
by grinder (Bishop) on Apr 23, 2003 at 15:38 UTC |