Index: trunk/src/org/openstreetmap/josm/actions/CopyAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CopyAction.java	(revision 6320)
+++ trunk/src/org/openstreetmap/josm/actions/CopyAction.java	(revision 6321)
@@ -24,4 +24,7 @@
  */
 public final class CopyAction extends JosmAction {
+    
+    // regular expression that matches text clipboard contents after copying
+    public static final String CLIPBOARD_REGEXP = "((node|way|relation)\\s\\d+,)*(node|way|relation)\\s\\d+";
 
     /**
@@ -53,5 +56,5 @@
         StringBuilder idsBuilder = new StringBuilder();
         for (OsmPrimitive p : primitives) {
-            idsBuilder.append(OsmPrimitiveType.from(p)).append(" ");
+            idsBuilder.append(OsmPrimitiveType.from(p).getAPIName()).append(" ");
             idsBuilder.append(p.getId()).append(",");
         }
Index: trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 6320)
+++ trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 6321)
@@ -254,5 +254,5 @@
 
         String buf = Utils.getClipboardContent();
-        if (buf == null || buf.isEmpty() || buf.matches("(\\d+,)*\\d+")) {
+        if (buf == null || buf.isEmpty() || buf.matches(CopyAction.CLIPBOARD_REGEXP)) {
             pasteTagsFromJOSMBuffer(selection);
         } else {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 6320)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 6321)
@@ -38,4 +38,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.CopyAction;
 import org.openstreetmap.josm.actions.PasteTagsAction;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -334,5 +335,5 @@
             
             String buf = Utils.getClipboardContent();
-            if (buf == null || buf.isEmpty() || buf.matches("(\\d+,)*\\d+")) {
+            if (buf == null || buf.isEmpty() || buf.matches(CopyAction.CLIPBOARD_REGEXP)) {
                 List<PrimitiveData> directlyAdded = Main.pasteBuffer.getDirectlyAdded();
                 if (directlyAdded==null || directlyAdded.isEmpty()) return;
