Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Durham, North Carolina, USA
    Posts
    140
    Thanks
    5
    Thanked 1 Time in 1 Post

    Find commas in numbers

    Hi everyone,

    I'm proofing a scientific document written by several authors. They didn't follow our corporate style guide which states that we shouldn't use commas to separate thousands. I'm trying to figure the correct wildcard expression to find them but so far I haven't been able to make it work. Can anyone help?

    Thanks.

    Beej

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    If you want to find the pattern of one digit, then a comma, then 3 digits, maybe:

    Code:
    ^#,^#^#^#
    Note: that's without using wildcards. There's probably a completely different syntax for wildcard searching.

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    For a wildcard Find/Replace, I'd go for something like:
    Find = ([0-9]),([0-9])
    Replace = \1\2
    The above will find any two comma-separated numbers. If it's legitmate to have such strings apart from those that are numbers with thousands separators, you could use:
    Find = ([0-9]{1,3}),([0-9]{3})
    Replace = \1\2
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. The Following 2 Users Say Thank You to macropod For This Useful Post:

    itsjustb (2011-03-16),zimmerlip (2011-12-01)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •