On 01/03/07, TerryJ <[EMAIL PROTECTED]> wrote:


I've inserted some inane comments.


noop-3 wrote:
>
> On 02/28/2007 03:43 PM, TerryJ wrote:
>>
>> I'm glad that worked.  (Terry Allen asked why it worked and I'm
replying
>> to
>> the list.)
>>
>> Look at Help under Regular Expressions.  Help is not completely
accurate
>> and
>> regular expressions in Calc at least (and probably OOo generally) is
>> idiosyncratic and partly broken.
>>
>> As you discovered, Find and Replace cannot find a leading
apostrophe.  It
>> can probably find an apostrophe at any other position in a cell.
>>
>> The combination I gave you, I believe, finds everything that can be
found
>> and replaces the contents of the cell with what is found.  Since the
>> leading
>> apostrophe is not found, it is not included in the replacement.
>
> That's an interesting & informative read - thanks! I had been exporting
> as a csv & sometimes cut+paste, but that resolves the problem.
>
> Although I'm a little confused as to why
> http://qa.openoffice.org/issues/show_bug.cgi?id=29054 is shown as
> "Closed/Invalid"
> [http://qa.openoffice.org/issues/show_bug.cgi?id=62596 is marked as a
> duplicate of the 2004 29054 bug].
>
> It seems that this was discovered in 2004, yet the help documentation
> doesn't list it, and the "Regular Expressions" table doesn't either.
> Would this be a documentation issue, or an actual bug in the code?
>
>

I believe the answer is probably a tentative "yes".  (Non-answer
intentional.)  A documentation issue may be easier to push because it's
easier to fix.



>
> BTW: just searching for . (single . not .*) works as well. So if you
> have the following:
>
> A1 = '123
> A2 = 4'56
> A3 = Abc'
> A4 = "789
>
> Regular Expressions checked.
> Search for: .
> Replace with: &
>
> Will find all 4 cells, but only the ' in '123 will be replaced.
>
> Does exactly the same in StarOffice 8 (I've been test driving that
> against 2.1 to see what if any differences there are).
>
>

Thanks for that.  The next time the subject comes up, I'll float that and
see whether I get any bites from someone who has taken more trouble with
regex.  Because the OOo developers have devised their own rules instead of
using common conventions and have taken the further steps of then breaking
their own rules and writing "Help" which doesn't, I cannot rouse myself to
take much interest in the use of regex in OOo.
--
View this message in context:
http://www.nabble.com/Removing-formatting-marks-from-Calc-cells-tf3307180.html#a9244151
Sent from the openoffice - users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sorry but I don't understand. On my Win XP Pro/SP2 system with OO
2.1finding and replacing single quotes simply isn't a problem; I don't
even
have to use regular expressions. The only time I'd need a regular expression
(RE) is if I want to find/replace single quotes *only* when they appear as
the first (or last) character of a cell - or for some other reason I'd want
to use RE's anyway. To find a leading quote the RE to use is "^'"
(circumflex, quote) where the circumflex says "at the beginning" and the
quote says "quote".

On my UK keyboard there are two possible "single quote" characters. the
first looks like '''''''' (really an apostrophe I suppose, a short
*vertical* mark) and the other looks like ``````` (really a grave accent,
slanting top left to bottom right). My remarks above about find/replace/REs
apply to both.

Please someone explain what I'm missing here.

--
Harold Fuchs
London, England
Please reply *only* to users@openoffice.org

Reply via email to