Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 6858)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 6859)
@@ -6,4 +6,5 @@
 import java.text.MessageFormat;
 import java.util.EnumSet;
+import java.util.Set;
 import java.util.regex.Pattern;
 
@@ -78,6 +79,8 @@
         REGEX, NREGEX, ONE_OF, BEGINS_WITH, ENDS_WITH, CONTAINS;
 
+        private static Set<Op> NEGATED_OPS = EnumSet.of(NEQ, NREGEX);
+
         public boolean eval(String testString, String prototypeString) {
-            if (testString == null && this != NEQ)
+            if (testString == null && !NEGATED_OPS.contains(this))
                 return false;
             switch (this) {
@@ -202,7 +205,11 @@
         public boolean applies(Environment env) {
             final String value = env.osm.get(k);
-            return value != null && (op.equals(Op.REGEX)
-                    ? pattern.matcher(value).find()
-                    : !pattern.matcher(value).find());
+            if (Op.REGEX.equals(op)) {
+                return value != null && pattern.matcher(value).find();
+            } else if (Op.NREGEX.equals(op)) {
+                return value == null || !pattern.matcher(value).find();
+            } else {
+                throw new IllegalStateException();
+            }
         }
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy	(revision 6858)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy	(revision 6859)
@@ -166,4 +166,15 @@
 
     @Test
+    public void testNRegexKeyConditionSelector() throws Exception {
+        def s1 = getParser("*[sport][tourism != hotel]").selector()
+        assert s1.matches(new Environment().withPrimitive(TestUtils.createPrimitive("node sport=foobar")))
+        assert !s1.matches(new Environment().withPrimitive(TestUtils.createPrimitive("node sport=foobar tourism=hotel")))
+        def s2 = getParser("*[sport][tourism != hotel][leisure !~ /^(sports_centre|stadium|)\$/]").selector()
+        assert s2.matches(new Environment().withPrimitive(TestUtils.createPrimitive("node sport=foobar")))
+        assert !s2.matches(new Environment().withPrimitive(TestUtils.createPrimitive("node sport=foobar tourism=hotel")))
+        assert !s2.matches(new Environment().withPrimitive(TestUtils.createPrimitive("node sport=foobar leisure=stadium")))
+    }
+
+    @Test
     public void testKeyKeyCondition() throws Exception {
         def c1 = (Condition.KeyValueCondition) getParser("[foo = *bar]").condition(Condition.Context.PRIMITIVE)
