<?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 I extract an address from a text field using vb script with string?  in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/how-do-i-extract-an-address-from-a-text-field/m-p/582903#M32950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at the &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/geocoding-toolbox/standardize-addresses.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/geocoding-toolbox/standardize-addresses.htm"&gt;Standardize Addresses—Help | ArcGIS for Desktop&lt;/A&gt; tool? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jan 2016 19:09:56 GMT</pubDate>
    <dc:creator>WesMiller</dc:creator>
    <dc:date>2016-01-21T19:09:56Z</dc:date>
    <item>
      <title>How do I extract an address from a text field using vb script with string?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-extract-an-address-from-a-text-field/m-p/582902#M32949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the address of 101 Main st. All I want is the street up until the space to be extract so just the main st portion for all of my address using the field calculator -&amp;gt; VB Script -&amp;gt; type: string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 17:39:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-extract-an-address-from-a-text-field/m-p/582902#M32949</guid>
      <dc:creator>CaitlinChristenson1</dc:creator>
      <dc:date>2016-01-21T17:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract an address from a text field using vb script with string?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-extract-an-address-from-a-text-field/m-p/582903#M32950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at the &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/geocoding-toolbox/standardize-addresses.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/geocoding-toolbox/standardize-addresses.htm"&gt;Standardize Addresses—Help | ArcGIS for Desktop&lt;/A&gt; tool? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 19:09:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-extract-an-address-from-a-text-field/m-p/582903#M32950</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-01-21T19:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract an address from a text field using vb script with string?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-extract-an-address-from-a-text-field/m-p/582904#M32951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Used to do that in vb, but now I do it in python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In VB you can use the right right() function.&amp;nbsp; You could also use a split() function but with multi word street names it gets tricky to glue them back together.&amp;nbsp; Here is how I like to do it in python (with credit to &lt;A href="https://community.esri.com/migrated-users/19932"&gt;Darren Wiens&lt;/A&gt;​)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All you need to do with this is adjust the return statement at the end to return which ever variable you want...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def myParser(inString):&lt;/P&gt;&lt;P&gt;&amp;nbsp; splitString = inString.split(' ')&amp;nbsp;&amp;nbsp; ## split address&lt;/P&gt;&lt;P&gt;&amp;nbsp; a = splitString[0]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## house number&lt;/P&gt;&lt;P&gt;&amp;nbsp; b = splitString[1]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## predir&lt;/P&gt;&lt;P&gt;&amp;nbsp; c = ' '.join(splitString[2:-1])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## join back together the #2 element and everthing before the -1(last) element&lt;/P&gt;&lt;P&gt;&amp;nbsp; d = splitString[-1]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## suf dir or s type&lt;/P&gt;&lt;P&gt;&amp;nbsp; return c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## this one returns the street name for example main or joes view&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myParser(!YourAddressField!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 19:23:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-extract-an-address-from-a-text-field/m-p/582904#M32951</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2016-01-21T19:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract an address from a text field using vb script with string?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-extract-an-address-from-a-text-field/m-p/582905#M32952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Several ways to go about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now do you simply want to strip out the numerical portion of the address and store it in a new attribute or do you simply want to get rid of it.?&lt;/P&gt;&lt;P&gt;I will assume you want to preserve the numerical portion of the address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This part will allow you to populate the new Number attribute&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left( [servAddr1], (instr(1, [servAddr1]," ")-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what this does is takes the left portion of the full address up to the first space and populate just that.&amp;nbsp; The -1 is critical or it will copy the space as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the rest of it this formula will take everything but the number.&amp;nbsp; I populated servAddr2 with the number&lt;/P&gt;&lt;P&gt;mid( [servAddr1], (len( [servAddr2])+2),50)&lt;/P&gt;&lt;P&gt; In this case it will populate the street portion with everything after the space after the number.&amp;nbsp; It will take the length of your address portion&amp;nbsp; and start there and put in everything after that. The +2 is important so it will start 2 spaces after the end of the number and not include the space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it actually takes a lot longer to write this than it does to do it.&amp;nbsp;&amp;nbsp; Just substitute servAddr1 with your attributes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 19:30:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-extract-an-address-from-a-text-field/m-p/582905#M32952</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2016-01-21T19:30:55Z</dc:date>
    </item>
  </channel>
</rss>

