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 section in the OO help, but nothing I try is successful.  I
> thought that "\([:print:]\)" would work, but it doesn't.

Try: "\(.*\)"

The * means zero or more occurrences of the preceding "thing", so in
your case you were searching for zero or more open brackets immediately
followed by a close bracket. (It was finding the close brackets -
right?).

The . means any character, so .* means any group of characters.

But remember that it is "greedy" so that if there is more than one
bracketed expression in a paragraph it will find from the start of the
first bracketed expression to the end of the last. To get around this
problem try: "\([^(]*\)"

This searches for an open bracket, anything that isn't an open bracket
followed by a close bracket.

Thanks, Ian

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

Reply via email to