A
alexw
Hi,
I am not a new user, but I couldn't find a suitable group for this, so
I posted it here.
I'm experiencing strange behaviour with Word's (2003 SP3) Advanced
Find & Replace w/ the "Use wildcards" option.
What I'm trying to do:
Find all paragraphs consisting only of numbers, add a prefix to the
number and replace the closing paragraph mark with a whitespace.
This is to move recitals (marginal numbers) to the beginning of the
related paragraph.
The first problem I encountered was with search (this is w/ a .txt
file made from the original .doc, so the recitals become regular
paragraphs w/ only the number in them).
Searching for paragraph marks with ^13 works.
Searching for numbers with ([0-9]{1;}) works as well (please note that
this is a German localized system, so ';' is indeed correct).
Combining both to ^13([0-9]{1;})^13 doesn't work. It finds none of the
targets and 'finds' several completely wrong numbers w/ no paragraph
marks next to them.
Neither do ([0-9]{1;})^13 or ^13([0-9]{1;}) work.
So far, the description was for a .txt file.
After the attempts described above not working, I moved to the actual
incoming .doc file, which has the recitals formatted with a special
paragraph style and a positioning frame (btw, I'm not sure whether I
use the correct English expressions because, unfortunately, I'm forced
to use a localized German version of Word).
Removing the positioning frame is easy. I can also easily replace the
paragraph marks by spaces when searching w/ the style required.
What goes wrong completely, is trying to add the prefix to the recital
numbers. The behaviour is *very* strange.
When I try to add the prefix to the expression itself, it is
- added completely *after* the number (expression) instead of being
prepended if the prefix is one or two letters;
- added in part before the number and after the number, if the prefix
is three or more letters, w/ less letters added before the number and
more letters added after the number if the number of digits goes up.
This behaviour occurs both w/ and w/o the "Use wildcards" option ("\1"
and "^&", resp., with the prefix added correctly before them in the
"replace" field).
To me, this looks like broken code/a bug. Almost posted this
in .applicationerrors, but that one looks more like a developers
forum.
Any ideas?
I am not a new user, but I couldn't find a suitable group for this, so
I posted it here.
I'm experiencing strange behaviour with Word's (2003 SP3) Advanced
Find & Replace w/ the "Use wildcards" option.
What I'm trying to do:
Find all paragraphs consisting only of numbers, add a prefix to the
number and replace the closing paragraph mark with a whitespace.
This is to move recitals (marginal numbers) to the beginning of the
related paragraph.
The first problem I encountered was with search (this is w/ a .txt
file made from the original .doc, so the recitals become regular
paragraphs w/ only the number in them).
Searching for paragraph marks with ^13 works.
Searching for numbers with ([0-9]{1;}) works as well (please note that
this is a German localized system, so ';' is indeed correct).
Combining both to ^13([0-9]{1;})^13 doesn't work. It finds none of the
targets and 'finds' several completely wrong numbers w/ no paragraph
marks next to them.
Neither do ([0-9]{1;})^13 or ^13([0-9]{1;}) work.
So far, the description was for a .txt file.
After the attempts described above not working, I moved to the actual
incoming .doc file, which has the recitals formatted with a special
paragraph style and a positioning frame (btw, I'm not sure whether I
use the correct English expressions because, unfortunately, I'm forced
to use a localized German version of Word).
Removing the positioning frame is easy. I can also easily replace the
paragraph marks by spaces when searching w/ the style required.
What goes wrong completely, is trying to add the prefix to the recital
numbers. The behaviour is *very* strange.
When I try to add the prefix to the expression itself, it is
- added completely *after* the number (expression) instead of being
prepended if the prefix is one or two letters;
- added in part before the number and after the number, if the prefix
is three or more letters, w/ less letters added before the number and
more letters added after the number if the number of digits goes up.
This behaviour occurs both w/ and w/o the "Use wildcards" option ("\1"
and "^&", resp., with the prefix added correctly before them in the
"replace" field).
To me, this looks like broken code/a bug. Almost posted this
in .applicationerrors, but that one looks more like a developers
forum.
Any ideas?