That works perfectly. I wish I understood how it works. But just knowing that it does will save me so much time.
Thanks for your assistance!!!!
$ is a dollar sign normally - but in GREP it means end of paragraph.
To get around this we escape it using a "\" so it's written as \$ - that now finds dollar signs.
Putting it in parenthesis makes it a "Found item" (\$) and because it's the first on the search marked as Found 1
\d is a digit and \d+ means keep finding digits until there isn't anymore - again putting it parenthesis makes it a Found string (\d+)
"." means any character at all - to get a full stop or a period it's written as "\." where the "\" escapes and captures just a full stop. We don't want this as a Found string.
Therefore (\$)(\d+)\.(\d+) = Find a dollar sign and remember it as Found, find any digits after this and remember it as Found. Find a full stop but not mark it as Found. And find all digits after this up until there are no more and mark them as Found.
In the change string
$ = a Found String
What you wanted to do was swap the First Found string and put it at the end.
$2 and $3 are the digits within the price.
So I want these to go First
And I want to separate them with a comma
Now I want to put the dollar sign (first found string) at the end
Thanks for the explanation. Well said, and easy to understand for us GREP novices.