<?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: Add spaces before capital letters in camel case string in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-spaces-before-capital-letters-in-camel-case-string/m-p/554882#M65844</link>
    <description>&lt;LI-CODE lang="markup"&gt;| rex field=Porter mode=sed "s/(?&amp;lt;capital&amp;gt;[A-Z]+)/ \1/g s/_//g"
| eval Porter=trim(Porter)&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 08 Jun 2021 10:26:03 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-06-08T10:26:03Z</dc:date>
    <item>
      <title>Add spaces before capital letters in camel case string</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-spaces-before-capital-letters-in-camel-case-string/m-p/554879#M65843</link>
      <description>&lt;P&gt;I have a field in which values are in the camel case. I want them to be in proper format with spaces between each word.&lt;/P&gt;&lt;P&gt;For example in the below table:&lt;/P&gt;&lt;TABLE border="1" width="25%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;STRONG&gt;Porter&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;AddressUnlocatable_&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;RestrictedAreaAM_&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="41px"&gt;&lt;P&gt;CustomerShifted_&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want its values to be like:&lt;/P&gt;&lt;TABLE border="1" width="25%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;STRONG&gt;Porter&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Address Unlocatable&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Restricted Area AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="41px"&gt;&lt;P&gt;Customer Shifted&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried this:&lt;/P&gt;&lt;P&gt;| rex field=Porter mode=sed "s/_//g s/A/ A/g s/B/ B/g s/C/ C/g s/D/ D/g s/E/ E/g s/F/ F/g s/G/ G/g s/H/ H/g s/I/ I/g s/J/ J/g s/K/ K/g s/L/ L/g s/M/ M/g s/N/ N/g s/O/ O/g s/P/ P/g s/Q/ Q/g s/R/ R/g s/S/ S/g s/T/ T/g s/U/ U/g s/V/ V/g s/W/ W/g s/X/ X/g s/Y/ Y/g s/Z/ Z/g s/A M/AM/g"&lt;BR /&gt;| eval Porter=trim(Porter)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is working fine but it is making my queries very long. Can anyone suggest a smaller query to do the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 10:07:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-spaces-before-capital-letters-in-camel-case-string/m-p/554879#M65843</guid>
      <dc:creator>Utkarsh_</dc:creator>
      <dc:date>2021-06-08T10:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Add spaces before capital letters in camel case string</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-spaces-before-capital-letters-in-camel-case-string/m-p/554882#M65844</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex field=Porter mode=sed "s/(?&amp;lt;capital&amp;gt;[A-Z]+)/ \1/g s/_//g"
| eval Porter=trim(Porter)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Jun 2021 10:26:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-spaces-before-capital-letters-in-camel-case-string/m-p/554882#M65844</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-08T10:26:03Z</dc:date>
    </item>
  </channel>
</rss>

