79581681

Date: 2025-04-18 20:32:33
Score: 1.5
Natty:
Report link

After some experimenting, I found that the code generates the desired output without the need to write files to the file system, delayed expansion and without a for loop.

set myvar="aaa^<bbb"

set xxx=%myvar:<=^^<%
set zzz=%xxx:"=%
echo %zzz%

I would appreciate some comments with theories why the %myvar:<=^^^<% did not work and the %myvar:<=^^<% works.

Reasons:
  • Blacklisted phrase (1): did not work
  • Blacklisted phrase (1.5): would appreciate
  • Has code block (-0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: George Robinson