Mailing List AE-List@media-motion.tv — Message #65612
From: Nathan Shipley <AE-List@media-motion.tv>
Subject: Re: [AE] Regex help on expression
Date: Tue, 24 Sep 2019 14:47:59 -0700
To: After Effects Mail List <AE-List@media-motion.tv>
Have you tried using https://regexr.com/ to build/check your expression?

On Tue, Sep 24, 2019 at 2:31 PM Byron Nash <AE-List@media-motion.tv> wrote:
I'm trying to craft a regular expression to locate some parts of a string and manipulate it with expressions. Do we have any REGEX experts in here?

text.sourceText.match(/(?<=\d)ST|ND|RD|TH/g);

I'm trying to locate one of those strings (ST|ND|RD|TH) but only if it follows a number. For some reason the thing returns the string if a word begins with one of those strings. I can't figure out why it's doing that. I'm telling it only look after digits. 
 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster