shouting versus dotting

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Oct 5 09:17:18 PDT 2008


Sean Kelly wrote:
> Andrei Alexandrescu wrote:
>> Sean Kelly wrote:
>>>
>>> Will do.  It's easy enough to search-replace '!' with '.'
>>
>> You'll need a sed expression to not catch unary ! and != as well.
> 
> Nah, just replace "!(" with ".("  I basically never use "!(exp)" in 
> conditions so there should be no problems.

Well well laziness never helps.

sed --in-place -e 's/\([a-zA-Z0-9_]\)\(\s*\)!\(\s*\)(/\1\2.\3(/' *.d

Preserves whitespace used around !, too. Won't transform instantiations 
across lines. And won't work with Unicode symbols...


Andrei



More information about the Digitalmars-d mailing list