parse a string with hex code? - Forum

Forum Navigation
You need to log in to create posts and topics.

parse a string with hex code?

Isit possible to parse a string on the bases of a hex code, I somehow seem to have forgotten this very basic thing.

for example I would like to split a string on hex 0A 20

thanks Fred formerly known as frednet

@mail

The StrParse command accepts more than one character as a search string; this worked for me ...

SetVar "[srcStr]" "abcdef"
StrParse "[srcStr]" "cd" "[parsedArray]" "[countItems]"
AlertBox "count" "[countItems]"

... so try ...

StrParse "[yourHexStr]" "[#0a][#20]" "[parsedArray]" "[countItems]"

... or ...

StrParse "[yourHexStr]" "[#10] " "[parsedArray]" "[countItems]"

Note: Ascii 20 is just the space character

luishp and mail have reacted to this post.
luishpmail

Gaev,

Thank you very much for putting me on track again, it works like a charm :).

My mistake was that I put the # symbol outside the brackets so like #[22] instead of [#22]

Old age and not enough practice..

Have not done serious coding for years , but now a friend needs to import a few hundred pdf documents into her tax papers. Conversion to exel is a mes of misplaced frames. So I stripped the thing to a csv and now want to tidy things up by cutting out garbage :)