Home » Questions » Computers [ Ask a new question ]

Matching digits in Notepad++ extended search mode

Matching digits in Notepad++ extended search mode

Notepad++'s manual is rather vague on the special character for numerical used in extended search mode. It says: \d### - Decimal value (between 000 and 255) but literally entering "\d###" doesn't match anything.

Asked by: Guest | Views: 70
Total answers/comments: 1
Guest [Entry]

"if VarA == 12
VarB = 1

if VarA == 16
VarB = 0

Using Find/Replace with Regular expression

Find what: if VarA == ([0-9]+)
Replace with: if VarA == \1 \n\t Var\1=1

Run ""Replace All""

Result:

if VarA == 12
Var12=1
VarB = 1

if VarA == 16
Var16=1
VarB = 0

Is this what you were looking for?"