How can I replace a certain pattern in a string?
1 vue (au cours des 30 derniers jours)
Hi! I'm trying to replace a certain pattern in a string using strrep. The original string is like 'abbabba', and I want to replace all 'abba' into 'aaaa'. The expected result is 'aaaaaaa' (7 'a's). I tried the following command:
Note that the result has 8 'a's, while 7 'a's are expected. I wonder how can I get the desired result. Thanks so much!