Add to Technorati Favorites
Welcome to ThePowerShellGuy.com Sign in | Join | Help

PowerShell : to Hex and back

from an IRC question :

[string]::join('',([byte[]]([regex]::matches("1A3761592352350C7A5F20172F1E1A190E2B017313371312141A1539",'\w{2}') |% {"0x$_"}) |% {$_.tostring('x')}))


1a376159235235c7a5f20172f1e1a19e2b17313371312141a1539

Ok, maybe more useful on 2 lines ;-) 

Enjoy,

Greetings /\/\o\/\/

Published Wednesday, May 02, 2007 12:01 PM by MoW
Filed under: ,

Comments

No Comments
Anonymous comments are disabled