Aug 16, 2012, 9:26 AM
Post #1 of 7
First of all, sorry for my english ;)
[SOLVED] 2 beginner questions
I got two questions:
1) I have a variable which contains a hexadecimal number, for example:
I want to print it as '3e 5c 46 85 da'. In other words, to use a space separator every two hexadecimal numbers. How can I do that?
2) I was trying to use Regular Expressions but I still get a null variable. I got a string like this:
'%SystemDrive%\Documents and Settings\XXXXX'
I want to save the 'XXXXX' in a variable, and I know that is always after the last backslash (\).
I tried this:
$owner = %SystemDrive%\Documents and Settings\LocalService;
$owner =~ tr/[\\.*$]//;
But when I print it, $owner contains no data. Any solution?
(This post was edited by HaHaMan on Aug 16, 2012, 12:35 PM)