Use a negative look-behind assertion.
$str =~ s/(?<!C):/"/g ;
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
--Friedrich Nietzsche
In reply to Re: Is there a way I can substitute for ":" except when it is preceded by a letter C
by DamnDirtyApe
in thread Is there a way I can substitute for ":" except when it is preceded by a letter C
by kirk123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |