<?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: Is there a way to remove a specific character from a string in ArcGIS in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627720#M48884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Done it. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Mar 2018 11:56:22 GMT</pubDate>
    <dc:creator>Adil_Toorawa</dc:creator>
    <dc:date>2018-03-06T11:56:22Z</dc:date>
    <item>
      <title>Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627715#M48879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a list as follows;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Object ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Field 1&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Example,Example&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,Example,Example,Example&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,Example&lt;/P&gt;&lt;P&gt;I want to remove just the first comma.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate your assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 10:31:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627715#M48879</guid>
      <dc:creator>Adil_Toorawa</dc:creator>
      <dc:date>2018-03-06T10:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627716#M48880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;lots of ways, but a simple code block might do it&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# ---- code block&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;func&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;','&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; a

&lt;SPAN class="comment token"&gt;# --- 'a' is your field name with the python parser, the expression would be&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; func(!YourFieldNameHere!&lt;/SPAN&gt;


a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Example,Example'&lt;/SPAN&gt;

a
&lt;SPAN class="string token"&gt;'Example,Example'&lt;/SPAN&gt;

b &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;',Example,Example,Example'&lt;/SPAN&gt;

func&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;b&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'Example,Example,Example'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:44:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627716#M48880</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T02:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627717#M48881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or more simply as a straight field calculation... python parser&lt;/P&gt;&lt;P&gt;replace 'a' with your field name in exclamation marks as above&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;',Example,Example,Example'&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;','&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;27&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Example,Example,Example'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627717#M48881</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T02:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627718#M48882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, thanks for this however it doesn't seem to work. I replaced 'a' with my field name. I am using field calculator. Do i have to add anything in codeblock?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 11:18:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627718#M48882</guid>
      <dc:creator>Adil_Toorawa</dc:creator>
      <dc:date>2018-03-06T11:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627719#M48883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set the field calculator to following for the second example&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;python parser&lt;/LI&gt;&lt;LI&gt;make sure that you have activated your new field ie 'newfield&lt;/LI&gt;&lt;LI&gt;!fieldnamehere! is the name of the old field containing the data&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #999999;"&gt;[!fieldnamehere!&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #999999;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; !fieldnamehere!&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #999999;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #990000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #990000;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #999999;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #999999;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #999999;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #999999;"&gt;[!fieldnamehere![&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #990000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #990000;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #999999;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: rgba(255, 255, 255, 0.5); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #a67f59; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #a67f59;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #669900; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #669900;"&gt;','&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #999999;"&gt;]&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;And if you are getting an error, then show it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the code block, nothing needs to be changed, but your expression box would call the function with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;func(!fieldnamehere!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, python parser and you are calculating values in a new text field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 11:30:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627719#M48883</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-06T11:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627720#M48884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Done it. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 11:56:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627720#M48884</guid>
      <dc:creator>Adil_Toorawa</dc:creator>
      <dc:date>2018-03-06T11:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627721#M48885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adil... perhaps you could mark the thread Answered with the one that provided you the answer so others know a solution was reached and what one was used&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 12:08:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627721#M48885</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-06T12:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627722#M48886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In&amp;nbsp; case you have multiple commas at the start you could use this function in the code block:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;EliminateStartignCommas&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;txt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;while&lt;/SPAN&gt; txt&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;','&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; txt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; txt&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; txt&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:44:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627722#M48886</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T02:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627723#M48887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also use txt.lstrip(",")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:47:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627723#M48887</guid>
      <dc:creator>PeteCrosier</dc:creator>
      <dc:date>2018-03-06T14:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627724#M48888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And just to play devils advocate....&amp;nbsp; What about a find and replace for " , "&amp;nbsp; at the start of the field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/398173_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627724#M48888</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2018-03-06T14:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627725#M48889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To be completely inclusive&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;txt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"!A simple question becomes a Monty Python Circus"&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Good'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Grief!!!'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;txt&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; '!"&lt;SPAN class="comment token"&gt;#$%&amp;amp;\'()*+,-./:;&amp;lt;=&amp;gt;?@[\\]^_`{|}~']&lt;/SPAN&gt;

&lt;SPAN class="string token"&gt;'Grief!!'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:44:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627725#M48889</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T02:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627726#M48890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a somewhat similar question that I have problem solving&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Object ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Field&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Apple.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Orange.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Egg&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I would like to remove the trailing "." if any. However my code below simply check the string and remove all last characters.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Trim(Left([Field], LEN([Field])-1))&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Appreciate any help.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 01:51:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627726#M48890</guid>
      <dc:creator>BryanL</dc:creator>
      <dc:date>2018-05-09T01:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627727#M48891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Easiest way is probably using a Python expression, something like !field!.rstrip(".")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 08:42:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627727#M48891</guid>
      <dc:creator>PeteCrosier</dc:creator>
      <dc:date>2018-05-09T08:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove a specific character from a string in ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627728#M48892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF right([Field],1) = "." then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Field] = Trim(Left([Field],LEN([Field])-1))&lt;/P&gt;&lt;P&gt;ELSE&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;[Field]=Trim([Field])&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 14:41:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-remove-a-specific-character-from/m-p/627728#M48892</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2018-05-09T14:41:28Z</dc:date>
    </item>
  </channel>
</rss>

