Smart relation descriptions
[potlatch2.git] / net / systemeD / halcyon / connection / Entity.as
index 8b4629bfc55c894891dd495856dc532578ac56fe..522d57d5c04355540f8c722522e3bbab0bb040a8 100644 (file)
@@ -128,6 +128,14 @@ package net.systemeD.halcyon.connection {
             return tags[key];
         }
 
+               /** Retrieve a key matching a regex. */
+               public function getTagByRegex(regex:RegExp):String {
+                       for (var k:String in tags) {
+                               if (k.match(regex)) return tags[k];
+                       }
+                       return null;
+               }
+
         /** @return true if there exists key=value */
         public function tagIs(key:String,value:String):Boolean {
             if (!tags[key]) { return false; }