#!/bin/bashs="#Foo barFoo bar#Baz fooBaz foo"perl -pe 's/^#.*(*SKIP)(*F)|o{2,}/"O" x length($&)/ge' <<< "$s"
Standard input is empty
#Foo bar FOO bar #Baz foo Baz fOO
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!