alertname: '(?:OnBattery)'
but not
alertname: '(?i:OnBattery)'
I think I can see why it's broken. If I open the Javascript console, then use the second regexp, it barfs with:
routing-tree.js:163 Uncaught SyntaxError: Invalid regular expression: /^(?:(?i:OnBattery))$/: Invalid group
at new RegExp (<anonymous>)
at massage (routing-tree.js:163)
at routing-tree.js:177
That is, the implementation already decided to wrap the regexp in ^(?:...)$, presumably to anchor it, and the (?i:...) syntax can't be nested inside. I think it would be better not to wrap it, but instead to check that the match has a start point of 0 and a length equal to the original string length.
I don't know who maintains routing-tree-editor, but it looks a bit broken in other ways too. I gave it this simple config, and it couldn't draw it: