incubator-ooo-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johnny Rosenberg <gurus.knu...@gmail.com>
Subject Re: Is there a way to do this...
Date Fri, 25 May 2012 16:02:48 GMT
2012/5/25 Ima Afrotrap <afrotrap@gmail.com>:
> On Thursday, 24 May 2012 16:21 Johnny Rosenberg wrote:
>> 2012/5/24 Johnny Rosenberg <gurus.knugum@gmail.com>:
>> > 2012/5/24 Ima Afrotrap <afrotrap@gmail.com>:
>
>  <snip>
>
>> >> Here are some more cut and pasted straight from the e-book examples
>> >> (note also not just the comma, but it happens with a period):
>> >>
>> >> -----
>> >> said Jonnie."Don't you follow
>> >>
>> >> “You can have my other four horses,”
>> >
>> > I find it odd to have a comma inside a quote, but that's maybe another
>> > story.
>> >
>> >> said Jonnie to Chrissie."Don't eat them;
>> >> they're trained.” He paused."Unless you get awful hungry, of course,
>> >> like in the winter.”
>> >>
>> >> "I’ve been investigating a suspicion of conspiracy to sabotage
>> >> transport,” said Terl."Kept me busy for the last three weeks.”
>> >> -----
>> >>
>> >> I hope I'm showing everything necessary to see the problem better. If
>> >> you want even more examples, just holler and I'll cut and paste  a page
>> >> if it's not too big.
>> >>
>> >>
>
>  <snip>
>
>>
>> In your example, this seems to work:
>> ☒ Regular expressions
>>
>> Search for: (.|,|:|;)("|“)([:alnum:])
>> Replace with: $1 $2$3
>>
>> Things inside parentheses are ”memorised”, so the string found in the
>> first parenthesis can be called with $1 in the Replace with field and
>> so on.
>>
>> So first I search for one of . , : ; followed by either a " or a “
>> (not a ”) followed by an alphanumeric character (a-z, A-Z, 0-9).
>> For example ."D is found. It will be replaced by the result of the
>> first pair of parentheses followed by a space followed by the two last
>> pair of parentheses, in this case . "D.
>>
>> Try it out and see if it works for you. You can always use the undo
>> button to undo a ”Replace All”, for example.
>> If it doesn't work in all cases, maybe you can try to modify it or
>> write back and tell us (or at least me…) what went wrong. I am sure
>> there is some cases that I didn't think of…
>>
>>
>> Kind regards
>>
>> Johnny Rosenberg
>
>  Okay, that seemed to work except that it put an extra space in front of
> anything with a comma or apostrophe, which was an easy fix in itself for the
> most part.

So there was obviously something that I didn't think about after all.
I would like to correct it, but right now I haven't got the time.
Going away over the weekend and have some things to do before that. I
am sure (almost, at least) that there is a solution that behaves
better than the one I made. Maybe someone else have a better one?



Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

> At least now I'll have far, far fewer of these to stop me during my
> reading so I can 'fix' the ones that are now few and far between (there was
> 3300+ 'fixed' by your solution and 963 'fixed' by mine afterward and I see very
> few that neither of ours got to).
>
>  Thank you very much for this help as it's made things a hell of a lot easier
> on me now. Hopefully one day scanners will get good enough to not make such
> awful mistakes, but I won't hold my breath, heh.
>
>  Take care and thanks again.
>
>
>  JB
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
> For additional commands, e-mail: ooo-users-help@incubator.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Mime
View raw message