String from index position

Discussion created by wtgeographer on Mar 3, 2014
Latest reply on Mar 5, 2014 by wtgeographer
Trying to calculate field using all the leftmost characters of [TEXTSTRING] up to the first occurrence of "out" in [TEXTSTRING] whose position has been calculated and placed in [POSITION] field.  The following is  vbscript but I'm sure there is an easy python solution to this. The script should help clarify...

[position] = first occurrence of "out" in [TEXTSTRING]

Left( [TEXTSTRING], Len( [TEXTSTRING] ) [position] )

I hope this make sense?