http://qs321.pair.com?node_id=307617

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks !

Let's define the example first :-) I have following two texts :

- John is following jane
- John is following Jane

Yes, the only difference is the capital 'J'. Now my question: I'd like to replace both occurences of 'Jane' with let's say '##Jane##'. The search should be case insensitive but the replace should be case sensitive.

So the result in this example should be :

- John is following ##jane##
- John is following ##Jane##

Is this solvable with a regex ?

Many many thanks for your help !

Dany