Notepad ++ - keep numbers only

2020-04-05 07:39发布

问题:

I have a text file containing numbers and characters (in arabic)

like this:

943894رنيش964737

ترشقة1045051

ضمنزلبالق10653

to this:

943894964737

1045051

10653

I want to remove everything apart from the numbers

I looked at a possible solution here:

Find/Remove (keep only Numbers)

But its not working for me, plus its not very clear to me

回答1:

use regex replace with this regex: [^\d] and replace with empty string

press ctrl+f
goto replace tab
check regular expressions
put '[^\d]' in search
press 'replace all'

use this regex if you want to keep line breaks: [^\d\r\n]



标签: notepad++