Duplicate with rules
#1
Is it possible to put a character between the duplicated password if you duplicate it using rules so "abc123" would turn into "abc123$abc123" for example?
Reply
#2
"$$ d"
Reply
#3
@penguinkeeper You forgot that the appended "$" will also get duplicated and should be removed.
Not sure if my solution is the most efficient way, but I think you can solve it by using:

1) rotating to the right, "}" will rotate the word to the right, so "abc123$abc123$" becomes "$abc123$abc123"
2) delete the first character "D0" to remove the "$" in front.
The rule that you should use @simon0302010 is:

"$$ d } D0"
Reply
#4
Or just truncate right side with "$$ d ]" if you don't want it at the end too
Reply
#5
Heart 
(08-22-2024, 12:00 PM)penguinkeeper Wrote: Or just truncate right side with "$$ d ]" if you don't want it at the end too

Great! I was already wondering how to truncate from the left, I tried "$$ d D-1", which would be the pythonic way to do it and did not work.
I learned something new today, much appreciated.
Reply
#6
It worked, thx
Reply