Bug 33662 - ucr regexp matching does not work as expected, returns .*
ucr regexp matching does not work as expected, returns .*
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UCR
UCS 3.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
:
Depends on: 18254
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-05 11:19 CET by Arvid Requate
Modified: 2018-04-14 13:29 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2013-12-05 11:19:37 CET
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
[...]
=========================================================
Comment 1 Philipp Hahn univentionstaff 2013-12-05 11:36:01 CET
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)
Comment 2 Philipp Hahn univentionstaff 2013-12-05 11:39:16 CET
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]+'
Comment 3 Arvid Requate univentionstaff 2013-12-06 10:22:40 CET
IMHO the empty  foo/.* lines are no real Variables, have only informative character and should not be shown with brief.
Comment 4 Philipp Hahn univentionstaff 2013-12-06 10:48:37 CET
(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.
Comment 5 Stefan Gohmann univentionstaff 2013-12-30 10:06:12 CET
I think the current behavior is OK.