Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using 10.0 ArcView and am trying to get the "R" in R12345678910 to drop. I lost all my scripts I've saved and appreciate some assistance.

The numbers are in a column in the attribute table and i've always used VB scripting. I was using Field Calculator.

share|improve this question
Where is this R12345678910 at? A field value in an attribute table? In the middle of a script? Field Calculator? Do you want a Python only solution? Some more details may yield more answers. – Baltok Dec 11 '12 at 20:52
Do all the values in your field have the same number of characters and/or number values? Also, do all the values begin with R? – Baltok Dec 11 '12 at 21:15
yes on both. R3415160838 is an example, same number of characters and the "R" in front of all. – Zoran Dec 11 '12 at 21:20
up vote 6 down vote accepted

Edit Appending [1:] to a string in python will remove the initial character. Look up slice in the python help.

To use this in the ArcGIS field calculator, you will need to turn on Python parsing

for the unitCode = enter

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

[1: ] did not work - "there was a failure during processing, check the geoprocessing results window for details" – Zoran Dec 11 '12 at 20:49
perfect regan. thank you. – Zoran Dec 12 '12 at 15:46

VBScript Example:

Right( [FieldName], 11 )

This code will take the 11 characters from the right, and anything left of those 11 characters is omitted.

Python Example:


This code takes a string and removes R from the left/front of it.

Both of these examples should get rid of the R in your strings.

Edit: Regan Sarwas' updated answer works great and is actually more versatile because it can handle more cases.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.