Copy link to clipboard
Copied
I have 2 kinds of sums. 20.95 and 20.-.
If the last 2 characters is an amount it should be superscripted. If it is .- it should not be changed. Can anyone help me with a grep style?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Actually, I don't think a GREP style is what you want here.
I say this because GREP styles (or any style) cannot add or remove text, ony change formatting, and I beleive you need to remove the . in the price as well as apply superscript to the two digits after it. I say this based on what is conventional in US, and if you are in another locale the rules might be different.
If my premise is correct, you should be using Find/Change.
Find (\d+\K)(\.)(\d{2}) and change to $3, adding the superscript formatting in the change format settings.