I have no idea about how I explain this, but here goes…
>>> x = 'qwertyHelloWorldasdfg'
>>> x = inversereplace(x, 'HelloWorld', 'a')
>>> print x
aaaaaaHelloWorldaaaaaa
>>> y = 'qwertyHelloWorld'
>>> y = inversereplace(y, 'qwerty', '')
>>> print y
qwerty
In the function above, it replaces everything in x that is not Not the 2nd argument with the 3rd Argument.
How would I go about doing this?
If there is already a function that does this then please let me know.
Thanks in advance,
~DragonXDoom
This should work: