Hi. I'm trying to use a regex in the Python Caller transformer to search a string and return the search result to a new attribute. The regex works fine in the StringSearcher transformer but i'm getting a but stuck with the Python code. So far I have the following code. My table has an attribute called "text_line_data" which contains the string to search. I'm trying to extract the result of the regex search into a new attribute called PyTrackExtents but can't work out how to complete the code. Can anyone help?
import fme
import fmeobjects
import re
def AttributeExtractor(feature):
TextLine = feature.getAttribute('text_line_data')
feature.setAttribute("PyTrackExtents", TextLine)
p = re.compile('.{13}\\..{8}\\..{8}\\..{4}')
m = p.search("PyTrackExtents")


