diff --git a/src/core/Utils.mjs b/src/core/Utils.mjs index c99eccc9..634068c3 100755 --- a/src/core/Utils.mjs +++ b/src/core/Utils.mjs @@ -1182,6 +1182,7 @@ class Utils { "CRLF": /\r\n/g, "Forward slash": /\//g, "Backslash": /\\/g, + "0x with comma": /,?0x/g, "0x": /0x/g, "\\x": /\\x/g, "None": /\s+/g // Included here to remove whitespace when there shouldn't be any diff --git a/src/core/operations/FromHex.mjs b/src/core/operations/FromHex.mjs index 94d54009..cccd7812 100644 --- a/src/core/operations/FromHex.mjs +++ b/src/core/operations/FromHex.mjs @@ -71,12 +71,17 @@ class FromHex extends Operation { args: ["CRLF"] }, { - match: "^[\\dA-F]{2}(?:0x[\\dA-F]{2})*$", + match: "^(?:0x[\\dA-F]{2})+$", flags: "i", args: ["0x"] }, { - match: "^[\\dA-F]{2}(?:\\\\x[\\dA-F]{2})*$", + match: "^0x[\\dA-F]{2}(?:,0x[\\dA-F]{2})*$", + flags: "i", + args: ["0x with comma"] + }, + { + match: "^(?:\\\\x[\\dA-F]{2})+$", flags: "i", args: ["\\x"] }