incubator-ooo-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ima Afrotrap <afrot...@gmail.com>
Subject Re: Is there a way to do this...
Date Thu, 24 May 2012 23:59:00 GMT
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. 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


Mime
View raw message