[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.

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
dgsarnow
 
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 13.04 Raring ringtail, LibO 4.0.2.2 (Build ID 400m0 (Build:2))
Gurkha Welfare Trust
User avatar
TheGurkha
Moderator
 
Posts: 6426
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
king_026
 
Posts: 22
Joined: Wed Oct 15, 2008 8:42 pm


Return to Calc

Who is online

Users browsing this forum: No registered users and 24 guests