thousand separators in Regex Match Autosuggest Provider

Could someone give me the regex pattern and replacement pattern to replace blank thousands separators with commas? That is to say, 15 789 489 with 15,789,489.
Thanks.

Parents Reply
  • Former Member
    0 Former Member 7 months ago in reply to Paul

    sampleNumbers =
    (
    1 234 567 678
    1 234 567
    1 234
    21 234 567 678
    12 234 567
    11 234
    131 234 567 678
    211 234 567
    981 234
    )
    Loop, Parse, sampleNumbers, `n, `r
    myResults .= RegExReplace(RegExReplace(A_LoopField, "\s+"), "(?<=\d)(?=(\d{3})+$)", ",") "`n"
    MsgBox % myResults
    Return

Children