joe blogs
joe blogs

Reputation: 142

hex number case change with notepad++ regex

in a sentence in a file in a far off galaxy "uint32_t per = 0x400e10b4u;"

i want to change the case of all the hex numbers in header files using notepad++ find and replace with regex.

i can find the "400e10b4u" part of the number using the expression "(= 0x)(\w+)" in the find box, but cannot figure out how to replace the lowercase to upper case.

Notepad version 7.5.6 so im led to believe it can be done

Upvotes: 0

Views: 1309

Answers (1)

Matt.G
Matt.G

Reputation: 3609

Regex: (?<=0x)(\w+)

Replace with: \U$1

\U is for UpperCase Transformation

Demo

Upvotes: 5

Related Questions