Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Marc,

On 07.03.2011 15:31, Marc Grober wrote:
 I was just working with regex in LO 3.3.1 (osx) and was
unsuccessful with with placeholders (the placeholder was placed in
text). I found two different bits of documentation (internal and
wiki) that were not totally consistent and examples did not work.
Ran out of time on underlying project so did not resolve what issue
was. This was on my "list" to address but have yet to get to it....
Can you confirm both styles of placeholders work and offer example
that worked for you?

I hope not to have caused some confusion, because I shouldn't have
called "&" a "place holder". Is is a "(back-)reference" to the
search result, but [:digit:] is a place holder. Here is a somewhat
artificial example using both.

The original text:
     The cat never is blue with gray.
     This car almost is green like a leaf.
     A dog still is black same as coal.

Search string (There is a blank after "is"):
([:alpha:]*[:space:])([:alpha:]*[:space:])([:alpha:]*[:space:])is
([:alpha:]*)

Replace:
$1little $4 $2was $3

Text after replace:
     The little blue cat was never with gray.
     This little green car was almost like a leaf.
     A little black dog was still same as coal.

I hope it can give some ideas.

Karl-Heinz


-- 
Unsubscribe instructions: E-mail to users+help@libreoffice.org
List archive: http://listarchives.libreoffice.org/www/users/
*** All posts to this list are publicly archived for eternity ***

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.