- New Project -> New Comp -> Text Layer with sample text with numbers
- Add a text animator (scale) -> change scale values
- Add Expression Selector and replace expression with:
- text.sourceText.charAt(textIndex - 1).match(/[0-9]/) ? 100 : 0
This expression will change the scale of all numbers found in the text. Anything in the regex match can be there.. this is just an example. This should work as intended and it does.
If the font has ligatures and is checked, it will not work correctly. Tested this in AE 24.6.6 and 25.2.2 and is still not working as intended. The sample font I had used is Daniels Signature - Signature. Also tested with HopelessRomanticSociety - Regular. Both seem to show the same incorrect behavior.
I'm not sure if it's incorrectly calling the indices or if there's something extra that needs to be called for it to work with ligatures enabled. Any ideas or is this a bug?