Operation request: Prepend/append text
See original GitHub issueSummary
Especially when using the fork or the subsection operation, it would be useful to be able to
- Extract relevant parts
- Modify them
- Wrap them in surrounding text
The last step here is rather clunky at the moment, since it involves having to whip out find and replace regex which simply match everything
Up to step 2
Current workaround for step 3, notice how the regex is quite odd since .*
doesn’t work as expected.
Example
https://gchq.github.io/CyberChef/#recipe=Subsection(’ \\d%2B’,true,true,false)Find_/_Replace({‘option’:‘Regex’,‘string’:‘(\\d%2B)’},‘$1 1’,true,false,true,false)Sum(‘Space’)Find_/_Replace({‘option’:‘Regex’,‘string’:‘[^]%2B’},’ $%26’,true,false,true,true)&input=bWVzc2FnZSBHYW1lQWN0aW9uIHsKICAgIG9uZW9mIGFjdGlvbiB7CiAgICAgICAgQ2xpZW50UGxheWVyTW92ZSB1aW50MzIgY19wbGF5ZXJfbW92ZSA9IDA7CiAgICAgICAgU2VydmVyUGxheWVyTW92ZSBzX3BsYXllcl9tb3ZlID0gMTsKCiAgICAgICAgQ2xpZW50UGxheWVyVXBkYXRlIGNfcGxheWVyX3VwZGF0ZSA9IDI7CiAgICAgICAgU2VydmVyUGxheWVyVXBkYXRlIHNfcGxheWVyX3VwZGF0ZSA9IDM7CiAgICB9Cn0
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
The only issue when using Pad Lines in that fashion is that you have to make sure that the Length field matches (or is a multiple of) the Length of the Characters you want to repeat otherwise there will be partial repetitions. This functionality is useful so it will not be removed, it will instead be documented in the operation’s description.
I think that the operation’s argument name should be changed to “Character(s)” as it will still be valid to put a single character in there or several characters.
Sounds good 👍