I have a field with with descriptions and i need to extract the tax numbers from this field and put them into another field in the same layer.
Some examples of what i need .
12-5N-5W SW NW SW S & W OF CANAL,, TX 2 IN SWNW LS TX 2-A
- I need to extract "TX 2" from this field
23-3N-2W SW 4TH ST TOWNHOMES TX 11271 IN LT 4C BLK 1
- I need to extract "TX 11271" from this row
04-5N-5W SE TAX 3 & TAX 4 IN NWSE
- I need to extract "TAX 3, TAX 4" from this row
21-4N-3W SW TX 86, 89, 90 & 93 IN S 1/2 OF SW
- I need to exact "TX 86, 89,90 & 93" from this row
I currently can extract numbers with the following and i need help to include what i mentioned above. I guess i need to extract everything beginning at TX and before the space before the next alpha characters.
fc = r'C:\Temp\Parcels.shp'
with arcpy.da.UpdateCursor(fc,['Legal','Legal2']) as cursor:
for row in cursor:
row = ''.join([str(i) for i in row if i.isdigit()])