Andrew Douglas Pitonyak wrote:
You should post your code...
On 10/24/2009 06:05 AM, Johnny Rosenberg wrote:
One example:
Search for: ([a-zA-Z0-9\(\)])([\+|\-|\*|\/])([a-zA-Z0-9\(\)])
Replace with: $1 $2 $3
I tried this in OpenOffice.org Writer and it works perfectly.
Before:
a+b
hej(3)+svejs(4)
tjoho(x)+3
After:
a + b
hej(3) + svejs(4)
tjoho(x) + 3
Doing the same thing in OpenOffice.org Basic:
Before:
a+b
hej(3)+svejs(4)
tjoho(x)+3
After:
$1 $2 $3
hej(3$1 $2 $3vejs(4)
tjoho(x$1 $2 $3
Doesn't look very nice to me…
Is this a bug or am I not supposed to do this?
I believe that is exactly what Johnny did. I can reproduce it from the
above. Writer reformats the text in a document so the spacing is nicer.
In the Basic code editor the replace action inserts "$1 $2 $3" which is
pretty useless. At least I can conclude that regular expression
search/replace works differently in a Writer text document and in the
Basic editor.
Cheers
-- Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]