<?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: Cutting text from one field to add to another field. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241564#M66276</link>
    <description>&lt;P&gt;yes there is a space around the hyphen(both sides). This solution worked perfectly, I would like to understand the semantics behind how it worked. Like why [0] and [-1]&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 15:40:01 GMT</pubDate>
    <dc:creator>NicoMcBrain</dc:creator>
    <dc:date>2022-12-15T15:40:01Z</dc:date>
    <item>
      <title>Cutting text from one field to add to another field.</title>
      <link>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241533#M66274</link>
      <description>&lt;P&gt;I have&amp;nbsp; data in one field that looks like this 1 - EV-32818RC and it ranges with the first number reaching at max 74031 - EV-33160RC. What I am needing is the numbers before the hyphen cut and moved to another Field, only leaving behind the EV-*******. Both fields are text if that helps any.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 14:03:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241533#M66274</guid>
      <dc:creator>NicoMcBrain</dc:creator>
      <dc:date>2022-12-15T14:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting text from one field to add to another field.</title>
      <link>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241549#M66275</link>
      <description>&lt;P&gt;I would use split()&lt;/P&gt;&lt;P&gt;field.split()[0] for the first part and field.split()[-1] for the last part, assuming there is always a space before and after the hyphen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 14:47:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241549#M66275</guid>
      <dc:creator>dgiersz_cuyahoga</dc:creator>
      <dc:date>2022-12-15T14:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting text from one field to add to another field.</title>
      <link>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241564#M66276</link>
      <description>&lt;P&gt;yes there is a space around the hyphen(both sides). This solution worked perfectly, I would like to understand the semantics behind how it worked. Like why [0] and [-1]&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 15:40:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241564#M66276</guid>
      <dc:creator>NicoMcBrain</dc:creator>
      <dc:date>2022-12-15T15:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting text from one field to add to another field.</title>
      <link>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241570#M66277</link>
      <description>&lt;P&gt;split() creates a list of the strings using whitespace as the default separator.&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;74031 - EV-33160RC" becomes ['74031', '-', 'EV-33160RC']&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;You access contents of a list using the list index where 0 is the first item and -1 is the last item (The negative means start at the end and go through the list backwards)&lt;/P&gt;&lt;P&gt;field[1] and field [-2] in this case should both yield '-'&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 15:45:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241570#M66277</guid>
      <dc:creator>dgiersz_cuyahoga</dc:creator>
      <dc:date>2022-12-15T15:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting text from one field to add to another field.</title>
      <link>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241616#M66279</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 17:24:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cutting-text-from-one-field-to-add-to-another/m-p/1241616#M66279</guid>
      <dc:creator>NicoMcBrain</dc:creator>
      <dc:date>2022-12-15T17:24:02Z</dc:date>
    </item>
  </channel>
</rss>

