<?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: rstrip ... Remove all characters after the comma &amp;quot;,&amp;quot; in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/rstrip-remove-all-characters-after-the-comma-amp/m-p/476079#M37303</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi J,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do this using the '.rsplit' method.&amp;nbsp; Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;!Details_Primary_Address1!.rsplit(',', 1)[0]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Sep 2011 09:35:16 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2011-09-29T09:35:16Z</dc:date>
    <item>
      <title>rstrip ... Remove all characters after the comma &amp;quot;,&amp;quot;</title>
      <link>https://community.esri.com/t5/python-questions/rstrip-remove-all-characters-after-the-comma-amp/m-p/476078#M37302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to strip all characters to the right of the comma from a field named Details_Primary_Address.&amp;nbsp; For some reason this doesn't work&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;!Details_Primary_Address1!.rstrip(",")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;either does this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;!Details_Primary_Address1!.rstrip(',')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can just remove the comma like this &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;!Details_Primary_Address1!.replace(",", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but I want to also remove everthing after it (to the right).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for the insight.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 21:27:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/rstrip-remove-all-characters-after-the-comma-amp/m-p/476078#M37302</guid>
      <dc:creator>JMcNeil</dc:creator>
      <dc:date>2011-09-28T21:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: rstrip ... Remove all characters after the comma ","</title>
      <link>https://community.esri.com/t5/python-questions/rstrip-remove-all-characters-after-the-comma-amp/m-p/476079#M37303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi J,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do this using the '.rsplit' method.&amp;nbsp; Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;!Details_Primary_Address1!.rsplit(',', 1)[0]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 09:35:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/rstrip-remove-all-characters-after-the-comma-amp/m-p/476079#M37303</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2011-09-29T09:35:16Z</dc:date>
    </item>
  </channel>
</rss>

