On 2023-08-06 11:19, Jens Schmidt wrote: > I > will also add tests for matching property names having minuses and then > we can see how it goes. Went well. With a property name regexp "\\(?5:[[:alnum:]_-]+\\)" and the following Org file -------------------------------------------------- * H1 :BAR: :PROPERTIES: :TEST-FOO: 1 :END: * H2 :FOO: :PROPERTIES: :TEST-FOO: 2 :END: * H3 :BAR: :PROPERTIES: :-FOO: 1 :END: * H4 :FOO: :PROPERTIES: :-FOO: 2 :END: * H5 -------------------------------------------------- the search expressions "TEST-FOO!=*0-FOO" and "-FOO+TEST-FOO!=*0" work as expected, finding only the first heading. The expression "-FOO!=*0-FOO" does *not* work, though, since the leading minus in the property name is gobbled by the greedy inclusion/exclusion subexp "\\(?1:[-+:]\\)?". However, the remedy is simple: Add an explicit plus sign: "+-FOO!=*0-FOO". Documented that in the Org manual, added tests, looks good. Please check.