I want to create a new attribute from a regex pattern found in another existing attribute. If no pattern found then default to static value. Say for example, attribute bID has values 1<a>4, 44<a>, 98. My new attribute would be code1 would have values a, a, d. The regex finds the 'a' and 'd' is the default if no 'a' is found. I have played around with a series of transformers, but my solutions are clunky. Can someone propose an efficient solution? I'm struggling a bit with how to use the text editor to return a found regex pattern. Still learning! Also, I want to stick with implementing regex code because my actual problem may have a more complex regex pattern.
Thank you,
Tyler
FME2020.2.1.0 Win64