[Solved] Find and replace with wildcard

Discuss the spreadsheet application

[Solved] Find and replace with wildcard

Postby dgsarnow » Fri Nov 14, 2008 12:13 pm

I am using OO 3.0 in vista.

I have a calc spreadsheet with a number of cells that look like this: blahblahblah(yadayadayada)

I want to remove all the blahblahs and the first parentheses. In excel I would have done a find an replace and entered *( in find and set replace to nothing. How do I do this in calc. When I try, I get told it could not find the search key.

Please help.


Last edited by dgsarnow on Fri Apr 03, 2009 10:31 am, edited 1 time in total.
OpenOffice 3.1 | Ubuntu 9.04
Posts: 35
Joined: Fri May 02, 2008 6:20 pm

Re: Find and replace with wildcard

Postby TheGurkha » Fri Nov 14, 2008 1:08 pm

You need to use the regular expressions, I think.

See the results of this search for threads that mention regular expressions within them. Reg Exps.

(Look at the ones iwth [Solved] in the title first ;) )
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version:
Gurkha Welfare Trust
User avatar
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Find and replace with wildcard

Postby king_026 » Fri Nov 14, 2008 5:25 pm

Regular expressions will work. Here is a good like describing them in open office http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Writer#Repeating_match_.2B__.2A__.7Bm.2Cn.7D. The regular expression you are going to want is .*\( which looks complicated but I'll explain it. The period means match any single character, the * means match zero or more of the preceding character (any character because of the period), .* replaces * in your Excel expression. The parentheses is a special character in regular expressions so to get it to search for the literal ( you need to put a backslash before it. Remember you have to click "more options" and the regular expressions check box in the find and replace dialogue box to use regular expressions.
OOo 2.2.X on Ms Windows XP
Posts: 22
Joined: Wed Oct 15, 2008 8:42 pm

Return to Calc

Who is online

Users browsing this forum: macunaima5, RPG and 31 guests