So in my string, I have certain sections with hashes. For example, consider the string “#Hello, this is a sample string. This is another example of ###hashes”.
I want to replace that with:
“##Hello, this is a sample string, This is another example of ####hashes”.
(note that the number of hashes in each instance increased by one)
However, I’m not too sure how. I’d imagine it involved regular expressions, and I’ve searched a bit, but I’m not too sure what to do.
Can anyone help/lead me on the right path?
Cheers
1 Answer