[Solved] Find and replace with wildcard

Discuss the spreadsheet application
Post Reply
dgsarnow
Posts: 35
Joined: Fri May 02, 2008 6:20 pm

[Solved] Find and replace with wildcard

Post by dgsarnow »

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.

Cheers,

Dave
Last edited by dgsarnow on Fri Apr 03, 2009 10:31 am, edited 1 time in total.
OpenOffice 3.1 | Ubuntu 9.04
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Find and replace with wildcard

Post by TheGurkha »

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: 4.3.3.2
Gurkha Welfare Trust
king_026
Posts: 22
Joined: Wed Oct 15, 2008 8:42 pm

Re: Find and replace with wildcard

Post by king_026 »

Regular expressions will work. Here is a good like describing them in open office http://wiki.services.openoffice.org/wik ... 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
Post Reply