|more useful options|
Regex: Case insensitive search but case sensitive replaceby Anonymous Monk
|on Nov 17, 2003 at 10:24 UTC ( #307617=perlquestion: print w/replies, xml )||Need Help??|
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
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##
Is this solvable with a regex ?
Many many thanks for your help !
Back to Seekers of Perl Wisdom