the >- will make the yaml parser interpret every following indented line as a string. This is why no quotes are needed. Its just a way of incorporating multi-line strings into yaml.
The single line with quotes should have worked, its the most used approach, so that’s a bit strange. Do you mind copying and pasting the whole sensor config for the single line template that fails here so we can see why it fails?
regex_findall_index can be picky about having to use double quotes inside the brackets. Solution is to use singe quotes outside the whole template and double quotes inside or use double quotes inside and a multi-line template.
I would assume this may be caused by the backslashes. When ever you use backslashes in normal quotes, it’s called escaping. So the regex in the single line template is most likely getting the regex ((.*?)% instead of \((.*?)\%. Try adding a second backslash to the template for the inline one to see if it works.
value_template: "{{ value | regex_findall_index('\\((.*?)\\%') }}"
As a side note, why are you searching for the ( %? Wouldn’t you just want to find any number?