diff --git a/regenerate.js b/regenerate.js
index <HASH>..<HASH> 100644
--- a/regenerate.js
+++ b/regenerate.js
@@ -334,7 +334,7 @@
 
 	// In Regenerate output, `\0` will never be preceded by `\` because we sort
 	// by code point value, so let’s keep this regular expression simple:
-	var regexNull = /\\x00([^01234567]|$)/g;
+	var regexNull = /\\x00([^0123456789]|$)/g;
 	var createCharacterClasses = function(codePoints) {
 		// At this point, it’s safe to assume `codePoints` is a sorted array of
 		// numeric code point values.
diff --git a/tests/tests.js b/tests/tests.js
index <HASH>..<HASH> 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -92,6 +92,11 @@
 				'expected': '[\\x0012]'
 			},
 			{
+				'description': '\\0 may not be followed by a digit, even if it’s not an octal digit',
+				'codePoints': [0, 0x38, 0x39],
+				'expected': '[\\x0089]'
+			},
+			{
 				'description': 'All BMP code points',
 				'codePoints': bmp,
 				'expected': '[\\0-\\uFFFF]'
Make sure `\0` isn’t followed by a digit, not even if it’s a non-octal digit

This makes sure the output is fully spec-compliant, and avoids potential issues in strict mode in Internet Explorer/Chakra, Safari/JavaScriptCore, and Firefox/SpiderMonkey.

Closes #<I>.