Hello, fellow FMEers.
I'm very new to Python and to the PythonCaller, but we all need to start somewhere. I have wrestled with this problem basically all day and I still don't get it to work.
I have a textstring "A=0,5m, B = Bredd 0 m, C= Reduktionstal". From this string I want to extract the value between "Bredd " and " m" - in this case it is 0, but in can be 10, it can be 10.2.
I'm attaching an image of my progress so far... And the PythonCaller script so far:
import fme
import fmeobjects
import re
def FeatureProcessor(feature):
substr = re.search('Bredd (.*) m', feature.getAttribute('text'))
feature.setAttribute("substr", substr)
I have often come across this problem and I really want to learn how to solve it. Pls help!
Peter