Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notepad ++ - keep numbers only

Tags:

notepad++

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

like image 321
Ben Yermak Avatar asked Jun 24 '13 11:06

Ben Yermak


1 Answers

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]

like image 53
x4rf41 Avatar answered Dec 07 '22 04:12

x4rf41