AnsweredAssumed Answered

Calculate Field - String extraction

Question asked by Pi-Hellz on Mar 8, 2012
Latest reply on Mar 8, 2012 by Pi-Hellz
Hi,

I'm new to Python and I would like to calculate a field to extract the first five parenthesis that are separated by a comma.

LISTE_UNIT
(743 01:37), (230 02:03), (535 04:34), (217 04:54), (417 05:34),
(242 01:20), (235 02:02), (473 05:20), (442 08:46),
(242 01:21), (442 00:14), (473 04:21), (535 04:50), (273 05:06), (1605 17:51), (912 20:19),
(449 02:56), (242 03:44), (241 04:25), (442 04:32), (137 09:59),
(442 03:46), (242 04:05), (535 04:39), (473 05:02), (141 13:10), (140 04:54), (235 05:29), (249 05:57), (272 06:21), (449 02:45), (137 09:42), (441 05:06), (274 05:05), (243 05:17),
.....
.....
.....



arcpy.CalculateField_management(out_name,"LISTE_UNIT","!LISTE_UNIT![0:150]")

I have try to separate them by characters but the result was not so good.

Thanks for your help

Outcomes