Copy link to clipboard
Copied
Hi All
I have a Catalogue that I need to create in French as well - previously we went through manually and changed all the price fromatting. But I know there is a way using GREP and variables to automate this.
English Pricing format: $39.99 CA
French Pricing format: 52,50 $CA
thanks for your help
Find what:
(\$)(\d+)\.(\d+)
Replace by:
$2,$3~S$1
Note that the ~S means non-breaking space.
Search: ([$])(\d+).(\d+) (\u\u)
Replace: $2,$3 $1$4
Copy link to clipboard
Copied
Find what:
(\$)(\d+)\.(\d+)
Replace by:
$2,$3~S$1
Note that the ~S means non-breaking space.
Copy link to clipboard
Copied
thank you
could you explain this a little? it's it's saying it can't find any instances of (\$)(\d+)\.(\d+)
Copy link to clipboard
Copied
Are you sure that you are in the GREP tab of the search and replace window? Not the text tab?
(\$) Dollar sign
(\d+) one or more digits
\. a dot
(\d+) one or more digits
$2 what has been found inside the second parenthesis
, a comma
$3 what has been found inside the third parenthesis
~S a non-breaking space
$1 what has been found inside the first parenthesis
Copy link to clipboard
Copied
(looking sheepish) yup - that'll do it.
thanks so much
Copy link to clipboard
Copied
I am sorry, but my English is not good enough to understand your last answer.
Copy link to clipboard
Copied
Search: ([$])(\d+).(\d+) (\u\u)
Replace: $2,$3 $1$4
Copy link to clipboard
Copied
Same issue as above, it's not finding any instances of ([$])(\d+).(\d+) (\u\u)
Copy link to clipboard
Copied
Are you converting the currency as well as the format? If so, that may require a script instead of a grep.
Copy link to clipboard
Copied
no, just the format, thanks
Copy link to clipboard
Copied
\$ finds a dollar sign and distinguish it from grep code, as seen in the replace ($1, etc.) As you can see there are various expressions that ultimately can have the same results. I used [$] with same result.
\d+ finds multiple digits.
Expressions within () treats this as a group that can be moved within the replace.
\u finds capitalized letters.
$1 is the first found group, $2 is the second found group.
Look here for more information on GREP
Copy link to clipboard
Copied
thank so much, turns out i was in the wrong area in FIND/REPLACE. this explanation is very helpful - i will look into GREP more fir sure.
Copy link to clipboard
Copied
turns out i was in the wrong area in FIND/REPLACE
Isn't it what I wrote in my previous message?