https://bugzilla.novell.com/show_bug.cgi?id=281855 ------- Comment #6 from sh@novell.com 2007-06-11 05:37 MST ------- Of course regexps can't do everything. But they can do a lot more than most people think. Your example above could be written like this: ((sound|advanced).*){2} This finds: "alsa -- Advanced Linux Sound Architecture" "alsa-debuginfo -- Advanced Linux Sound Architecture" It does NOT find packages with only "sound" or only "advanced". Also please note that the word order in the summaries is different than in the search specification (searched for "sound|advanced", found "Advanced...Sound"). Granted, this regexp is not a trivial one. But it does its job, which should be plenty given the number of users who ever requested such a feature (which is one: you). Yes, if users want nonstandard things they'll sometimes need to cope with advanced tools. Regular expressions are such a tool. And in that particular case, you even get the advanced version: Qt regexps offer about as much as "egrep", not just the very limited version that "grep" (without "e") provides. Taking apart the above regexp for clarification: (sound|advanced) finds any of "sound" or "advanced". This will find more than you want; you want results that contain more than just one of those words. (xxx){2} finds 2 occurences of the expression in parentheses. It finds exactly 2; you could write {2,} for 2 or more or {,2} for no more than 2 or {1,2} for 1 or 2. You might know (xxx)* or (xxx)+ which will find any number (including 0) or any number, at least one, respectively. That are just shorthands to (xxx)* -> (xxx){0,} (xxx)+ -> (xxx){1,} The general form is (xxx){min,max} where "min" is 0, if omitted, and "max" is "infinity", if omitted. This regexp has one caveat: It will also find results that have the same word more than once. It's not absolutely perfect, but it does its job. This part of the bug report is FIXED (or it might be called INVALID because it's not a bug). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.