Univention Bugzilla – Bug 33662
ucr regexp matching does not work as expected, returns .*
Last modified: 2018-04-14 13:29:20 CEST
ucr regexp matching does not work as expected, the ".*" entry should not be there? ========================================================= root@master:~# ucr search --brief 'connector/s4/mapping/group/table/[A-Z]+' connector/s4/mapping/group/table/.*: <empty> connector/s4/mapping/group/table/Account Operators: Konten-Operatoren [...] =========================================================
Depending on what you put in ".*" it would match your "[A-Z]+", so: WORKS-FOR-ME. (See original Bug 18254 for the discussion of finding a overlap between two regular expressions)
If you're not interested in the "potentially existing" variables, but only in the "currently set" variables, use --non-empty: ucr search --non-empty --brief 'connector/s4/mapping/group/table/[A-Z]+'
IMHO the empty foo/.* lines are no real Variables, have only informative character and should not be shown with brief.
(In reply to Arvid Requate from comment #3) > IMHO the empty foo/.* lines are no real Variables, have only informative > character and should not be shown with brief. But "ucr --brief" also shows empty variables like xrdp/channels: <empty> so for consistency they should be removed as well? That is why --non-empty exists. It might be confusing that "--brief" does not imply "--non-empty". If that is changed, that is a API change which needs to be deferred until UCS-4. I'm not against that change, but only pointing out why it is currently implemented that way.
I think the current behavior is OK.