Dennis Marks wrote:
I'm trying to to a find and replace using regular expressions. I have
sentences in the format "nn:nn x". I want to replace it with
"nn:nn tabcharacter ". Example "1:34 Now is the time" replace
with "1:34 tabcharacter Now is the time".
I use "([0-9]+:[0-9]+
As far as I can tell, from the documentation and my own experiments, OOo
does not save "backreferences" from the search pattern to use in the
replacement pattern.
Even in a Regular Expression *search*, the *replacement* expression is
not a regular expression, it's a simple text string.
I've
The way I read the documentation (help file), the \n reference is only
available in the search string, not in the replacement string.
Characters which also may be used in the replacement string are called
out to be so (e.g. \t) The special character & is mentioned to do what
you want, but it o
I'm trying to to a find and replace using regular expressions. I have
sentences in the format "nn:nn x". I want to replace it with
"nn:nn tabcharacter ". Example "1:34 Now is the time" replace
with "1:34 tabcharacter Now is the time".
I use "([0-9]+:[0-9]+ )" in the find and "\
Ian ... that did it. And thanks to your explanation, I understand why.
¡Muchas gracias!
Jon
-Original Message-
From: Ian Laurenson [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 29, 2005 9:12 PM
To: users@openoffice.org
Subject:Re: [users] Regular Expression for
On Thu, 2005-12-29 at 18:30 -0600, Knight, Jon wrote:
> In Writer, I'd like to Search & Replace all occurrences of data enclosed in
> parentheses. I'm able to do so in MS Word by using "\(*\)" as a regular
> expression, without the double-quotes of course. I have read the regular
> expression sec
Well, thanks for the help (Keith & JC). At least, I'm one step closer!
Jon
-Original Message-
From: Keith Bates [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 29, 2005 8:45 PM
To: users@openoffice.org
Subject:Re: [users] Regular Expression for data in pa
On Thu, 29 Dec 2005 20:27:01 -0600
"Knight, Jon" <[EMAIL PROTECTED]> wrote:
> Alright, that works! (Thanks for steering me.) Is there anyway to
> turn off the "longest match" rule? When I've got something like
> "(data) text (data)", the whole bit is matched when I'd rather get
> two separate m
ssage-
From: Keith Bates [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 29, 2005 6:56 PM
To: users@openoffice.org
Subject:Re: [users] Regular Expression for data in parentheses
On Thu, 29 Dec 2005 18:30:13 -0600
"Knight, Jon" <[EMAIL PROTECTED]> wrote:
>
In Writer, I'd like to Search & Replace all occurrences of data
enclosed in
parentheses. I'm able to do so in MS Word by using "\(*\)" as a
regular
expression, without the double-quotes of course. I have read the
regular
expression section in the OO help, but nothing I try is successful.
On Thu, 29 Dec 2005 18:30:13 -0600
"Knight, Jon" <[EMAIL PROTECTED]> wrote:
> Using OO 2.0.1 on Windows ...
>
> In Writer, I'd like to Search & Replace all occurrences of data
> enclosed in parentheses. I'm able to do so in MS Word by using
> "\(*\)" as a regular expression, without the double-q
Using OO 2.0.1 on Windows ...
In Writer, I'd like to Search & Replace all occurrences of data enclosed in
parentheses. I'm able to do so in MS Word by using "\(*\)" as a regular
expression, without the double-quotes of course. I have read the regular
expression section in the OO help, but nothin
Don't put the question marks in the expression. What you want is just
[:space:][:space:][:space:][:space:][:space:][:space:][:space:][:space:].
A question mark means "match this character 0 times or 1 time only".
What is happening for you is that for every space character in your
document, one
On Wednesday, January 26, 2005, 3:00:30 PM, Mark Kirchner wrote:
>> [:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?
>
> [:space:]? means: One OR zero spaces (because of the "?"). So the
> complete expression will match anything from 0 to 8 spaces.
Ugh, copy & paste error: Th
On Wednesday, January 26, 2005, 2:38:53 PM, David Teague wrote:
> I want to replace the leading 8 spaces with 4. If I use eight of the
> regular expression [:space:]?, as
>
> [:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?
[:space:]? means: One OR zero spaces (because of the
Hi David,
I want to replace the leading 8 spaces with 4. If I use eight of the
regular expression [:space:]?, as
[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?
In regular expressions, normally the ? cardinality means 0 or 1
occurrence, so that expression would match any num
I have some C++ code with annoyingly many spaces of
indentation.
I want to replace the leading 8 spaces with 4. If I use eight of the
regular expression [:space:]?, as
[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?
and replace with say four of them, the find button in
17 matches
Mail list logo