I am trying to make a regex test that returns true for the following conditions: Can only have letters A-F (case insensitive) First character must be ‘#’ Can have numbers 0-9 Does not have punctuation The order does not matter except that string[0] should be ‘#’. So far I have: /^#[A-F0-9^!G-Z]/i but for some reason, it returns strings that have
Tag: hex
Javascript hexadecimal to ASCII with latin extended symbols
I am getting a hexadecimal value of my string that looks like this: Hexadecimal value of this string is: The problem is that when i try to convert this value back to ascii it poorly converts the č,š,ř,.. and returns symbol of little box with question mark in it instead of these symbols. My code for converting hex to ascii:
How to convert Unicode Hex Characters to Latin-1 in JavaScript
I’m using rae-api to get the definition of the words in their dictionary. The problem is for example: I search for the definition of the word hola, it returns como salutación familiar.. I …
How to remove the nth hexadecimal digit of a integer number without using Strings?
Consider a hexadecimal integer value such as n = 0x12345, how to get 0x1235 as result by doing remove(n, 3) (big endian)? For the inputs above I think this can be achieved by performing some bitwising steps: partA = extract the part from index 0 to targetIndex – 1 (should return 0x123); partB = extract […]
Crypto.js decrypt with key and iv (vector) in byte arrays
I have to decrypt some strings which are AES encrypted. Example encrypted string: 129212143036071008133136215105140171136216244116 I have a key, and a vector (iv) supplied to me in a byte-array …