Copy link to clipboard
Copied
So far I have this grep style, that allows the digits after the decimal to change to a different character style.
However, I need the decimal place to also be in the same style (see below)
Does anyone have any tips/ideas how I could achieve this?
When you use a positive lookbehind as you are, it won't affect the characters that you're looking for although it does help to avoid inadvertently formatting elements. jmlevy's suggestion should work, but I'd still to the positive loosbehind for a digit so that it only finds the period followed by two digits when it comes after another digit. Try the below expression because I don't think you'll ever have more than two digits after the period no?
(?<=\d)\.\d{2}
Copy link to clipboard
Copied
Did you try this?
\.\d+
Copy link to clipboard
Copied
When you use a positive lookbehind as you are, it won't affect the characters that you're looking for although it does help to avoid inadvertently formatting elements. jmlevy's suggestion should work, but I'd still to the positive loosbehind for a digit so that it only finds the period followed by two digits when it comes after another digit. Try the below expression because I don't think you'll ever have more than two digits after the period no?
(?<=\d)\.\d{2}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now