<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do you write expression in Label field to replace text with numbers ? in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309550#M3250</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Robert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless if you attributed them or not, the statement you said quote "&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;EM&gt;How do I write to replace them with text with just numbers&lt;/EM&gt;"&amp;nbsp; and then your example includes you wanting to have an output of &lt;STRONG&gt;83N&lt;/STRONG&gt;.&amp;nbsp; This is what was confusing.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Let me clarify:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Are you asking to have an output of labels of JUST NUMBERS?&amp;nbsp; so then it would only be 83.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;If you want an output of Labels of &lt;STRONG&gt;83N&lt;/STRONG&gt; in the example, then your statement of asking &lt;STRONG&gt;&lt;EM&gt;JUST NUMBERS&lt;/EM&gt;&lt;/STRONG&gt; is incorrect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a label expression to handle anything in a field to only label with Digits only then Check out my post reply to your original Post. &lt;/P&gt;&lt;P&gt;If you are looking at 'changing the original field so for a field calculator.. it is also the same idea, but slightly different... but then that comes to a challenged question of 'why are you creating fields to create labels?'...A separate discussion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jan 2016 22:28:38 GMT</pubDate>
    <dc:creator>MichaelRobb</dc:creator>
    <dc:date>2016-01-18T22:28:38Z</dc:date>
    <item>
      <title>How do you write expression in Label field to replace string with values ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309536#M3236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I have a field that has ID which show each road numbers ie: 200.B, 787, JEF-83N and they are all mixed up..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I write to replace them with text with just numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ie:&amp;nbsp; 2000. B&amp;nbsp; to 200&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JEF-83N&amp;nbsp; to 83N&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck here ?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is to display road numbers to show numbers within the Symbol&amp;nbsp; Like this &lt;IMG __jive_id="169371" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/169371_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;, &lt;IMG __jive_id="169372" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/169372_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;, &lt;IMG __jive_id="169379" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/169379_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using Label expression with VBscrpit but can take JScrpit or Python&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="169381" class="jive-image image-4" height="85" src="https://community.esri.com/legacyfs/online/169381_pastedImage_4.png" style="height: 85px; width: 88.7458px;" width="89" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 22:49:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309536#M3236</guid>
      <dc:creator>DEAF_PROBERT_68</dc:creator>
      <dc:date>2016-01-15T22:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309537#M3237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Conceptually, the first idea that comes to mind would be to &lt;EM&gt;cast&lt;/EM&gt; them to an integer field, which would theoretically drop out all the characters.&amp;nbsp;&amp;nbsp; I'll have to tinker with that....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I'm fairly sure there is a way to do this in Python, but don't know the specifics.&amp;nbsp; I'm sure there will be several replies soon here given the high level of Python skill on GeoNet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Donohue, GISP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 22:56:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309537#M3237</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2016-01-15T22:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309538#M3238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to rephrase your question to be as stupid as a computer. You're not looking for "numbers", you're looking for something that meets a set of rules that you've made up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, "if the road label contains a hyphen, I only want the characters after the hyphen"&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; string = 'JEF-83N'
... if '-' in string:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; road_number = string.split('-')[1]
... print road_number
... 
83N&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...or "if the road label contains a period, I only want the characters before the period"&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; string = '2000.B'
... if '.' in string:
...&amp;nbsp;&amp;nbsp;&amp;nbsp; road_number = string.split('.')[0]
... print road_number
...
2000&lt;/PRE&gt;&lt;P&gt;^ I assume in your example "&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;2000. B&amp;nbsp; to 200" you meant 2000.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:48:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309538#M3238</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T14:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309539#M3239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert - do you have other examples of the "before" and "after"?&amp;nbsp; I ask as in one of the two examples you provided there is still a non-number in the desired result:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;EF-83N&amp;nbsp; to 83N&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What &lt;A href="https://community.esri.com/migrated-users/19932"&gt;Darren Wiens&lt;/A&gt; suggested looks like it will do the trick for some of this, but I suspect there will be a bit more complexity that may require some other Python functions.&amp;nbsp; If you have a sample set of the start/desired result, that will help in figuring out the exact functions needed.&amp;nbsp; Essentially, as Darren mentions, you need to come up with the "rules".&amp;nbsp; Once the "rules" are assembled, the next step will be to come up with the functions that accomplish them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, my &lt;EM&gt;cast&lt;/EM&gt; idea didn't pan out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Donohue, GISP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 23:10:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309539#M3239</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2016-01-15T23:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309540#M3240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Definitely the rules...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not a solution for all cases!!!!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import string
&amp;gt;&amp;gt;&amp;gt; numbers = string.digits
&amp;gt;&amp;gt;&amp;gt; a = "JEF-83N"
&amp;gt;&amp;gt;&amp;gt; b = "".join([i for i in a if i in numbers])
&amp;gt;&amp;gt;&amp;gt; b
'83'&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although it looks like a solution, it will fail if a = "JEF-83N1" because you will probably not want the appending 1.&amp;nbsp; Also b is returned as a string...is that what you want ? probably.&lt;/P&gt;&lt;P&gt;So the points that Chris and Darren are trying to make, is that you need to establish the rules.&amp;nbsp; The point I will make, is that it may be easier to provide a two-step solution rather than finding the "panacea script".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309540#M3240</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T14:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309541#M3241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes correct&amp;nbsp; 2000.B to 2000.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2016 02:04:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309541#M3241</guid>
      <dc:creator>DEAF_PROBERT_68</dc:creator>
      <dc:date>2016-01-16T02:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309542#M3242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try that and see if that works. Wish me luck !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2016 23:43:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309542#M3242</guid>
      <dc:creator>DEAF_PROBERT_68</dc:creator>
      <dc:date>2016-01-16T23:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309543#M3243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is GIS - what could possibly go wrong?&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Donohue, GISP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2016 01:41:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309543#M3243</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2016-01-17T01:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309544#M3244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Last Friday, I was probably not thinking correctly. I came down a cold and wasn't thinking so when I wrote this post before I went home.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I haven't done anything since then. I will let you know how that works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.&amp;nbsp; Is that related to set of rules or related to label expression ?&lt;/P&gt;&lt;P&gt;I am going to do this anyway near in the future...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2016 19:26:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309544#M3244</guid>
      <dc:creator>DEAF_PROBERT_68</dc:creator>
      <dc:date>2016-01-17T19:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309545#M3245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To much thought going into this thread.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do it the simple way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply create a new string column to label from.&amp;nbsp; Use a string because an integer column will always have at least a zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go into MS Access and calculate then number column from the name column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Val([Roads]![STR_NAME])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then simply find and replace a whole cell values of Zero with a &amp;lt;Null&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 19:34:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309545#M3245</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2016-01-18T19:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309546#M3246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As already mentioned:&lt;/P&gt;&lt;P&gt;Based on the i.e. supplied. &lt;STRONG&gt;&lt;EM&gt;J&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;EF-83N&amp;nbsp; to 83N&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; How is 83&lt;EM&gt;&lt;STRONG&gt;N&lt;/STRONG&gt;&lt;/EM&gt; a numeric value ? (just a number would be 83, excluding the N.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 20:56:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309546#M3246</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2016-01-18T20:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309547#M3247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My thoughts on this:&lt;/P&gt;&lt;P&gt;Simply creating fields to satisfy labeling is a DBAs worst nightmare... as well as a developers worst nightmare and an architecture guys worst nightmare.&amp;nbsp; Any process used for updating the data then need to handle these 'one off's'.&amp;nbsp; And then How many one offs are to be made? There is no scalablity with this. Its an immediate fix that can make a huge mess in a hurry.&amp;nbsp; The data should be clean or in this case, if need be, expressions can be made.. its not hard.&amp;nbsp; &lt;/P&gt;&lt;P&gt;As mentioned above... Rules need to be understood.. then a simple expression codeblock can be derived... and it will work.&lt;/P&gt;&lt;P&gt;Where was it mentioned the poster was using a Personal Geodatabase?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 21:06:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309547#M3247</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2016-01-18T21:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309548#M3248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;I didn't attribute them. The layer was done by one of the Forest Service where I work for assigned the numbers and I believe they were on the forest road or private load. I haven't looked at them yet...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to create a map for one of our Ranger District who need me to make map of a Locator Map of their district ranger where their campground is and the layer I had had multiple road names there. I will work on them tomorrow ( Today&amp;nbsp; is a holiday for us to take the day off ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the field column I have for the roads has many multiple&amp;nbsp; road numbers like I mention at the top. So, what I am trying to do is show the symbol for each road that I have on the roads. Some of them have private roads, Forest road, Interstate, State and Federal roads. That is why I asked because the number and strings are mixed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I explained in more clarify this time that I posted from last Friday.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 22:13:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309548#M3248</guid>
      <dc:creator>DEAF_PROBERT_68</dc:creator>
      <dc:date>2016-01-18T22:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309549#M3249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Though there is a discrepancy with you asking for Just numbers but in your example, you included a character that is clearly not a number...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below works... I used a Regular Expression pattern to basically remove ANYTHING except digits.&amp;nbsp; But this expression can be tailored to anything you would like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this in your label Expression:&lt;/P&gt;&lt;P&gt;1. Check Advanced &lt;/P&gt;&lt;P&gt;2. Parcer = VBScript&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEST = the Field in the attribute table to get string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Function FindLabel ([TEST])&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Dim strInputString&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Dim strOutputString&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;strInputString = [TEST]&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Dim objRegEx&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;set objRegEx = createobject("VBScript.RegExp")&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;objRegEx.Global = True&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;objRegEx.Pattern ="[^0-9]"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;strOutputString = objRegEx.Replace(strInputString,"")&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;'Return string for Labeling&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;FindLabel = strOutputString&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;End Function&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 22:18:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309549#M3249</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2016-01-18T22:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309550#M3250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Robert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless if you attributed them or not, the statement you said quote "&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;EM&gt;How do I write to replace them with text with just numbers&lt;/EM&gt;"&amp;nbsp; and then your example includes you wanting to have an output of &lt;STRONG&gt;83N&lt;/STRONG&gt;.&amp;nbsp; This is what was confusing.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Let me clarify:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Are you asking to have an output of labels of JUST NUMBERS?&amp;nbsp; so then it would only be 83.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;If you want an output of Labels of &lt;STRONG&gt;83N&lt;/STRONG&gt; in the example, then your statement of asking &lt;STRONG&gt;&lt;EM&gt;JUST NUMBERS&lt;/EM&gt;&lt;/STRONG&gt; is incorrect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a label expression to handle anything in a field to only label with Digits only then Check out my post reply to your original Post. &lt;/P&gt;&lt;P&gt;If you are looking at 'changing the original field so for a field calculator.. it is also the same idea, but slightly different... but then that comes to a challenged question of 'why are you creating fields to create labels?'...A separate discussion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 22:28:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309550#M3250</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2016-01-18T22:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309551#M3251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All right, so saying numbers isn't the right word for writing an expression. Instead of numbers should I just say values , or string ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 23:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309551#M3251</guid>
      <dc:creator>DEAF_PROBERT_68</dc:creator>
      <dc:date>2016-01-18T23:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write expression in Label field to replace text with numbers ?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309552#M3252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as in the many examples that have been given, you are trying to extract numbers from a string...&lt;/P&gt;&lt;P&gt;"83" or '83' or 83N&amp;nbsp; are strings.&amp;nbsp; The first 2 are overt because they are enlosed in quotes. 83N has to be a string because you cannot have a number beside test because in programming world they are different objects.&amp;nbsp; As soon as you have an address, you are working with strings. ....so it is terminology that is the key and the many possibilities provide solutions.&amp;nbsp; I will reiterate again, as I do on these topics, ... don't wait for the "tool" that will work in all cases.&amp;nbsp; Breaking a problem down into its components, or exceptions will expedite a faster resolution by using several different tools rather than trying to find the all encompassing solutions.&amp;nbsp;&amp;nbsp; I am sure that your whole problem could have been resolved by using several little "solutions" rather than waiting for the "ONE" solution that will work in all cases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 23:46:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-do-you-write-expression-in-label-field-to/m-p/309552#M3252</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-18T23:46:15Z</dc:date>
    </item>
  </channel>
</rss>

