i have hex code below. the regex find code can match the string, but replace code wont keep the original string. my question : how to fix replace code to keep original string. thx
hex txtfile:
5839343C12050D000020410A2B
B81E053E12050D0000A0410A2B
0AD7A33C12050D000020420A2B
replace txtfile :
5839343C
12050D000020410A2B
B81E053E
12050D0000A0410A2B
0AD7A33C
12050D000020420A2B
notepad++ regex code :
find--12050D0000.*04.0A2B\s
replace-- \n012050D0000.*04.*0A2B\n
.*
in the replacement, that will just literally mean a dot followed by an asterisk there. You need to use capture groups in your expression -(.*)
, and then use back references -$1
,$2
, etc. - in your replacement.