diff --git a/index.html b/index.html
index 3e50d96..94d5e49 100644
--- a/index.html
+++ b/index.html
@@ -821,8 +821,8 @@
var input = document.getElementById("byte-input").value;
// Remove Arduino code
- input = input.replace(/const unsigned char myBitmap \[\] PROGMEM = \{/g, "");
- input = input.replace(/\};/g, "");
+ input = input.replace(/(const)?\s+(unsigned\s+char|uint8_t)\s+[a-zA-Z0-9]+\s*\[\]\s*(PROGMEM\s*)?=\s*/g, "");
+ input = input.replace(/\};|\{/g, "");
// Convert newlines to comma (helps to remove comments later)
input = input.replace(/\r\n|\r|\n/g, ",");
@@ -833,7 +833,7 @@
//Remove comments
input = input.replace(/\/\/(.+?),/g, "");
// Remove "0x"
- input = input.replace(/0x/g, "");
+ input = input.replace(/0[xX]/g, "");
// Split into list
var list = input.split(",");
console.log(list);