Closed rewegit closed 2 years ago
Implemented in next version
In current git-hub version it is still not working.
Can you show how you tried it?
@mickym2 can you please recheck that too with latest GitHub version?
So I tested it and these are my results:
Regular expressions are not working well.
has no output
I have only
.*
is working as regEx
but other types of regular expression will fail - and there is no output at all.
Ich hab mal eine Log Zeile eingefügt wenn er die Regex anwendet. dann sehen wir mal was er draus gemacht hat. Schau mal bitte
Aus
0_userdata\.\d.*
wird wohl
process list using regex /0_userdata\\.\d.*/
lol ... ja ich sehe das Problem ... warte
Retry please
wird eher schlimmer ;)
aus
0_userdata\.\d.*
wird
process list using regex /0_userdata\\.\\d.*/
Mit dem doppelten Backslash maskierst Du doch einen Backslash in regulären Ausdrücken?
Heisst es tut nicht?? hhhmmm ... ok, dann versuch bitte mal eins (sollte an sich nicht gehen aber hey vltt haben wir falsch gedacht)
https://github.com/ioBroker/ioBroker.node-red/commit/7be4f9414018a634776d0f34a3e436b97ac4ce44
An den beiden Stellen mach das .replace(/\\/g, '\\\\')
weg
Gehts dann?
In welcher Datei:
/opt/iobroker/node_modules/iobroker.node-red/nodes/ioBroker.js
(die ist aber vom Datum her alt)
Gesendet von Mail für Windows
Von: Ingo Fischer Gesendet: Donnerstag, 10. März 2022 18:33 An: ioBroker/ioBroker.node-red Cc: mickym2; Mention Betreff: Re: [ioBroker/ioBroker.node-red] iobroker-list dynamic regex (Issue#273)
Heisst es tut nicht?? hhhmmm ... ok, dann versuch bitte mal eins (sollte an sich nicht gehen aber hey vltt haben wir falsch gedacht) 7be4f94 An den beiden Stellen mach das .replace(/\/g, '\\') weg Gehts dann? — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>
OK - ich habe glaub die richtige Datei gefunden - aber nun habe ich wieder das wie vorher:
process list using regex /0_userdata\\.\d.*/
aahh ... ich meinte mach mal das "replace" komplett weg.
also nur "...new RegExp(node.regex)"
Ja das funktioniert super. ;)
aabf08caf2aa6b49: process list using regex /0_userdata\.\d\.testType\d$/
Diese Änderung ist approved-
Gibt aber noch ein anderes Problem mit der List Node - das ist mir erst die Tage aufgefallen - mach da ggf. neues Issue auf.
Github updated!
And yes ... create issue ... then I check if we can get that in too
Nein fällt mir gerade nicht ein - falls mir was auffällt melde ich es - im Moment ist denke ich von der iobroker list node alles OK. ;)
Released in 3.0.0
The iobroker-list can be configured via topic. This is very practical, e.g. if you put it in subflows. The output can be filtered with regex. This gives an enormous speed advantage compared to reading out the complete states with external filtering.
However, this is only possible statically, as it is not intended to pass the regex expression. Would it be possible to pass it, for example, in the payload or in a separate key?