# LibreOffice windows - extract numbers only from a long list of text and numbers [closed]

Hi I wonder how I can perform in LibreoOffice this extraction... using windows with Version: 4.2.2.1

I have LONG list like this...I have all in 1 cell in a spreadsheet...

24991 CIGUERA 24991 LOIS 24991 SALAMON 24991 VALBUENA DEL ROBLO 24994 BURON 24994 LIEGOS 24995 LARIO 24995 POLVOREDO 24996 ACEBEDO 24996 MARAÑA 24996 UÑA, LA

I need to extract the numbers only or delete the text...dont know if there is a better text manipulaiton software to do this or if libreoffice/open office can do it.

output should be

24991, 2499, 24994

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2016-03-05 18:16:30.564165

Sort by » oldest newest most voted

Paste the string in a cell, open search and replace dialog (ctrl + f) extended search option mark regular expression search for ([\s,0-9])([^0-9\s])+ and replace it with \$1

hit replace all (us a seperate document for not accidentally replacing something different!)

now you get a list like 24991 24991 24991 24991 24994 24994 24995 24995 24996 24996 24996

to replace mutliple withespaces (e.g. ibetween 24991 24994) search for \s+ and replace it with , to get the comma between. ;-)

(sorry, hadn't used regex for a very long time so there might be a one-time replacement search and replace possiblity)

more

Hello

→Search [^0-9]* and replace with , komma space

Karolus

more