jheyman

Split one field into multiple based on a delimiter

Discussion created by jheyman on Mar 26, 2013
Latest reply on Apr 3, 2013 by jskinner-esristaff
I am looking to split one field (BASE) into four based on a delimiter of ^ such as the following:

"PT COM 790 W INTER W LINE^B&S RR & S LINES SW LESS ^E200                     ^WEST"

I want

"PT COM 790 W INTER W LINE" to go to field "Line1"

"B&S RR & S LINES SW LESS" to go to field "Line2"

"E200                     " to go to field "Line3"

"WEST" to go to field "Line4"

I have searched online and have only seen splits based on X amount of space or only split once, not four times etc. Ex.
Line1 = !BASE!.split(" ", 1)[0]

Any help would be great, thanks.

Outcomes