Ask Your Question

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

asked 2014-10-29 13:20:53 +0100

mahadev gravatar image

updated 2016-03-05 18:16:21 +0100

Alex Kemp gravatar image

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

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

thanks for your help

edit retag flag offensive 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

2 Answers

Sort by » oldest newest most voted

answered 2014-10-29 15:50:19 +0100

Dennis Roczek gravatar image

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)

edit flag offensive delete link more

answered 2014-10-29 23:35:35 +0100

karolus gravatar image


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


edit flag offensive delete link more


Hi can i extract 10 digit phone numbers only in libre office? Plz let me know thank you

Preet Singh gravatar imagePreet Singh ( 2019-06-08 22:13:48 +0100 )edit

Question Tools

1 follower


Asked: 2014-10-29 13:20:53 +0100

Seen: 3,925 times

Last updated: Oct 29 '14