Replace .(fullstop) with ,(comma)

R

Rashid Khan

Hello All,
I have OCRed a long document in MS Word(Office XP) and have the following
problems with the output.

There are many tables having values and dates. The date is in the format
xx.xx.xxxx and there are many figures in the table in the format x,xxx or
xx,xxx.

While transferring the document from the OCR software there are many places
where the figures have appeared as x.xxx or xx.xxx --- I need to replace all
the figures with comma as separator and leave the dates intact.

Can this be achieved? I tried replacing
<any digit><fullstop><any digit> to
<any digit><comma><any digit> but it replaces the fullstop in the dates
also.

Any help or suggestions would be appreciated

TIA
Rashid Khan
 
G

Greg

Rashid,

I don't know if this can be done in one pass, but easy
enough in three.

Find
..([0-9]{4})
Replace with
$\1

Then Find
..([0-9]{3})
Replace with
,\1
Then Find
$
Replace with
..

Use any unique character in place of $ if $ is used
elsewhere in the document.
 
R

Rashid Khan

Hi Greg,
Thank u very much. Works like a charm
Rashid
Greg said:
Rashid,

I don't know if this can be done in one pass, but easy
enough in three.

Find
.([0-9]{4})
Replace with
$\1

Then Find
.([0-9]{3})
Replace with
,\1
Then Find
$
Replace with
.

Use any unique character in place of $ if $ is used
elsewhere in the document.

-----Original Message-----
Hello All,
I have OCRed a long document in MS Word(Office XP) and have the following
problems with the output.

There are many tables having values and dates. The date is in the format
xx.xx.xxxx and there are many figures in the table in the format x,xxx or
xx,xxx.

While transferring the document from the OCR software there are many places
where the figures have appeared as x.xxx or xx.xxx --- I need to replace all
the figures with comma as separator and leave the dates intact.

Can this be achieved? I tried replacing
<any digit><fullstop><any digit> to
<any digit><comma><any digit> but it replaces the fullstop in the dates
also.

Any help or suggestions would be appreciated

TIA
Rashid Khan


.
 
Top