open :F html file.html ; for //input[@type="checkbox"] { $attr = @*[xsh:matches(.,'\[0\]$')] ; $name = xsh:match($attr, '.*\.(.*)\[0\]$') ; if $name set @label $name ; } save :F html :b ;