|
|
Browse by Tags
All Tags » PowerShell » Hex
-
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\/\/
-
Didn't you always' wanted to know this ?
This time not a Hey Scripting Guy ! translation, but from a NG post answer Translating colors to hex and back (color asked was Red actually ;-) ) :PoSH> ''{0:x}'' -f ([drawing.Color]'Chocolate').ToArgb()
ffd2691e ...
-
I did not enter the beginners PowerShell Division, but did this 2 oneliners for Event 5: ABCs and 123s ( PS Answer: ABCs and 123s )
in the Beginner division: $r = $str.tochararray() | % {([int]$_).toString('x')}
[String]::join('',[Char[]]($r |% {[int]''0x$_''})) So you get the Following output :
PoSH> $str = ''It ...
|
|
|