I am looking for any implementation of case insensitive replacing function. For example, it should work like this:
'This iS IIS'.replaceAll('is', 'as');
and result should be:
'Thas as Ias'
Any ideas?
UPDATE:
It would be great to use it with variable:
var searchStr = 'is';
'This iS IIS'.replaceAll(searchStr, 'as');
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…