I have a string representing hex numbers, like this:
778206213082061D06092A
I want to get a string like this:
0x77, 0x82, 0x06, 0x21, 0x30, 0x82, 0x06, 0x1D, 0x06, 0x09, 0x2A
So every 2 characters, I want to insert , 0x
Is this doable with Notepad++?
Try this:
Find:
(..)
Replace:
0x\1,
The find expression (..)
matches any two characters (dot matches anything), and the parenthesis allow us to capture those two characters. We can then replace with the hex expression, accessing those two captured characters by using \1
(or $1
; Notepad++ will accept either). Note that there is a space after the comma in the replacement.
How about:
(..)
0x$1,
You have then to remove the last ,
if requested.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With