in reply to how to make sed case INsensitive

Though the other answers are probably more desirable, just for comparison, here's what you actually asked for (untested):
# You may also want additional substitutions # to backwhack sed metacharacters, e.g. # $search =~ s/\./\\./g; $search =~ s/([[:alpha:]])/"[".lc($1).uc($1)."]"/ge; system "sed -e s/$search/$replace/g $write1 > $write2";
But it's much easier to use the case insensitive regex switch in perl :-)
Update: Updated code. In reply to AM: I'm just creating sed character classes, which, e.g., replaces "a" with "[aA]" to make it case insensitive.

Replies are listed 'Best First'.
Re: Re: how to make sed case INsensitive
by Anonymous Monk on Jun 06, 2003 at 21:12 UTC
    can u explain me what u did to $search please thank you
      It's a waste of a process and computing time to do it that way and creates a needless dependency on an external tool. Why do you insist on sed?

      Makeshifts last the longest.