Hi Sergey,
>Result is not the same as with "case insensitive" flag. This code also changes case of the rest of string which may not be acceptable.
I agree with you. The results of the two methodologies are different.
However, if you re-read Michel's original post (743063), he does not specify the case of the returned string. His only concern is that all cases of the contained string are replaced. :)
Hugh
Microsoft hears loudest what the VFP community says about Visual FoxPro by looking at the bottom line!
Support the product. Buy the latest version!
Hugh Winters @ WorldData 408-512-1131