Find and replace

  • Thread starter Thread starter EK
  • Start date Start date
E

EK

Hi,

I have been trying to replace a single space, with a number (e.g. 12.24)
before and after it, with a comma using Word 2003. I want the numbers to stay
the same but the spaces before and after the number be replaced with a comma.
I tried several things but no success. Any idea. Thanks EK Esawi
 
Hi EK,

Find = ( )([0-9.]{1,})( )
Replace = ,\2,
Check the 'use wildcards' option.
Do note that this will also act on numbers followed by a period (eg 12. ). If you don't like that, you could use two Find/Replace
operations:
Find1 = ( )([0-9]{1,})( )
Find2 = ( )([0-9]{1,}.[0-9]{1,})( )
The first Find picks up integers only, whilst the second picks up decimals only.
 
Back
Top