Select to view content in your preferred language

Custom parse Python string

1906
11
Jump to solution
03-12-2019 02:47 PM
JeremyMcCollum1
Emerging Contributor

I have an attribute field that has a description that I only want to display a specific string or text.  I'm not sure if using a rsearch or rfind or another method for displaying what I want is best? For example, the text field:

 VILLAGES OF WOODLAND SPRINGS BLOCK 44 LOT 4
FIVE OAKS CROSSING ADDN BLOCK 1 LOT 6 PER PLAT D214124070
SUMMER CREEK SOUTH ADDITION BLOCK 8 LOT 3


I am only wanting to pull out the Block and block number and Lot and Lot number

thanks for any advice

Tags (2)
0 Kudos
11 Replies
JeremyMcCollum1
Emerging Contributor

Excellent, it finally did work!  I have some cleanup now.  Can I add another index to the code to include spaces? For example, there are some of the legaldesc field texts that say BL OCK or B LOCK that have random spaces.  Trying now to account for them.  Great help thought to get this far

0 Kudos
DanPatterson_Retired
MVP Emeritus

Jeremy you might want to mark mine correct.

Now for the ones with the spaces, you will have to modify indx0 for those cases

for example...

idx0 = row.index('BL OCK')

0 Kudos