<?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 How to remove specific part of string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specific-part-of-string/m-p/855066#M337970</link>
    <description>&lt;P&gt;An example of the string is below, how do I remove the TXX:XX:XX+XX:XX part of the string. I want to make it as dynamic as possible. Examples of how the string may appear in my data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;{"VariableA":"1","VaraibleB":"1","VariableC":"1","VariableD":"2023-01-02T13:30:10+00:00","VariableE":"1"}&lt;/P&gt;&lt;P&gt;{"VariableA":"1","VaraibleB":"1","VariableC":"1","VariableD":"","VariableE":"1"}&lt;/P&gt;&lt;P&gt;{"VariableA":"1","VaraibleB":"1","VariableD":"2023-01-02T13:30:10+00:00","VariableC":"1","VariableE":"1"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 12:21:32 GMT</pubDate>
    <dc:creator>BruceWayne</dc:creator>
    <dc:date>2023-01-23T12:21:32Z</dc:date>
    <item>
      <title>How to remove specific part of string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specific-part-of-string/m-p/855066#M337970</link>
      <description>&lt;P&gt;An example of the string is below, how do I remove the TXX:XX:XX+XX:XX part of the string. I want to make it as dynamic as possible. Examples of how the string may appear in my data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;{"VariableA":"1","VaraibleB":"1","VariableC":"1","VariableD":"2023-01-02T13:30:10+00:00","VariableE":"1"}&lt;/P&gt;&lt;P&gt;{"VariableA":"1","VaraibleB":"1","VariableC":"1","VariableD":"","VariableE":"1"}&lt;/P&gt;&lt;P&gt;{"VariableA":"1","VaraibleB":"1","VariableD":"2023-01-02T13:30:10+00:00","VariableC":"1","VariableE":"1"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 12:21:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specific-part-of-string/m-p/855066#M337970</guid>
      <dc:creator>BruceWayne</dc:creator>
      <dc:date>2023-01-23T12:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove specific part of string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specific-part-of-string/m-p/855070#M337973</link>
      <description>&lt;P&gt;A RegEx should do.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile datalines truncover;
  input have_str $300.;
  datalines4;
{"VariableA":"1","VaraibleB":"1","VariableC":"1","VariableD":"2023-01-02T13:30:10+00:00","VariableE":"1"}
{"VariableA":"1","VaraibleB":"1","VariableC":"1","VariableD":"","VariableE":"1"}
{"VariableA":"1","VaraibleB":"1","VariableD":"2023-01-02T13:30:10+00:00","VariableC":"1","VariableE":"1"}
;;;;

data want;
  set have;
  length want_str $300;
  want_str=prxchange('s/T\d\d:\d\d:\d\d\+\d\d:\d\d//oi',-1,trim(have_str));
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can help us help you if you post sample data via a working SAS data step as done above with data have and then also show us a concrete desired result based on the sample data provided.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 12:33:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specific-part-of-string/m-p/855070#M337973</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-01-23T12:33:58Z</dc:date>
    </item>
  </channel>
</rss>

