diff -Naur busybox.orig/util-linux/Config.in busybox/util-linux/Config.in
--- busybox.orig/util-linux/Config.in	2008-03-22 09:11:36 +0000
+++ busybox/util-linux/Config.in	2008-03-27 19:55:13 +0000
@@ -321,6 +321,13 @@
 
 	  For more information, please see docs/mdev.txt
 
+config FEATURE_MDEV_RENAME_REGEXP
+	bool "Support regular expressions substitutions when renaming device"
+	default n
+	depends on FEATURE_MDEV_RENAME
+	help
+	  Add support for regular expressions substitutions when renaming device.
+
 config FEATURE_MDEV_EXEC
 	bool "Support command execution at device addition/removal"
 	default n
diff -Naur busybox.orig/util-linux/mdev.c busybox/util-linux/mdev.c
--- busybox.orig/util-linux/mdev.c	2008-03-27 19:53:57 +0000
+++ busybox/util-linux/mdev.c	2008-03-27 20:15:08 +0000
@@ -70,6 +70,8 @@
 
 		while ((vline = line = xmalloc_fgetline(fp)) != NULL) {
 			int field;
+			// collection of matched substrings
+			regmatch_t off[1+9*ENABLE_FEATURE_MDEV_RENAME_REGEXP];
 
 			/* A pristine copy for command execution. */
 			char *orig_line;
@@ -98,16 +100,15 @@
 
 					/* Regex to match this device */
 					regex_t match;
-					regmatch_t off;
 					int result;
 
 					/* Is this it? */
 					xregcomp(&match, val, REG_EXTENDED);
-					result = regexec(&match, device_name, 1, &off, 0);
+					result = regexec(&match, device_name, sizeof(off)/sizeof(off[0]), off, 0);
 					regfree(&match);
 
 					/* If not this device, skip rest of line */
-					if (result || off.rm_so || off.rm_eo != strlen(device_name))
+					if (result || off[0].rm_so || off[0].rm_eo != strlen(device_name))
 						goto next_line;
 
 				} else if (field == 1) {
@@ -142,10 +143,30 @@
 
 				} else if (ENABLE_FEATURE_MDEV_RENAME && field == 3) {
 
-					if (*val != '>')
-						++field;
-					else
+					if ('>' == *val) {
+#if ENABLE_FEATURE_MDEV_RENAME_REGEXP
+						// substitute %1..9 with off[1..9], if any
+						char *s, *p;
+						p = alias = xzalloc(PATH_MAX);
+						s = val + 1;
+						while (*s) {
+							if ('%' == *s) {
+								unsigned i = (*++s-'0');
+								if (i < sizeof(off)/sizeof(off[0])) {
+									int n = off[i].rm_eo-off[i].rm_so;
+									strncpy(p, device_name+off[i].rm_so, n);
+									p += n;
+								}
+							} else {
+								*p++ = *s;
+							}
+							s++;
+						}
+#else
 						alias = xstrdup(val + 1);
+#endif
+					} else
+						++field;
 
 				}
 
