AnsweredAssumed Answered

Extracting numbers from string using python in ArcGIS Pro

Question asked by khaledali on May 31, 2019
Latest reply on May 31, 2019 by khaledali

I have a string field in the attribute table for a featureclass which has values like: "abc123_def23_987" and "fks243_ufs876_21". I've created another integer field and wish to extract the numbers after the last underscore (_) so that it yields the numbers "987" and "21" from the examples above respectively. As I'm using I'm using ArcGIS Pro. How can I accomplish this using the python in the "Calculate field" within ArcGIS Pro? I would greatly appreciate help on this. Thanks. 

Outcomes