<?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: How to replace characters in string from field extraction? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165956#M47201</link>
    <description>&lt;P&gt;I have not tried, but can i use a replace in the EVAL-foo for search time extraction @martin_mueller ? i need to replace the newline character in that field but no answers till now &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 02 Aug 2014 15:53:28 GMT</pubDate>
    <dc:creator>linu1988</dc:creator>
    <dc:date>2014-08-02T15:53:28Z</dc:date>
    <item>
      <title>How to replace characters in string from field extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165951#M47196</link>
      <description>&lt;P&gt;I have a field extraction as below which extracts a date into a field called my_date&lt;/P&gt;

&lt;PRE&gt;
EXTRACT-my_date = (?i)StopDateTimeLocal\W\W(?P&lt;MY_DATE&gt;.*?)\s 
&lt;/MY_DATE&gt;&lt;/PRE&gt;

&lt;P&gt;The above extraction will give me values like '2014-07-31'&lt;/P&gt;

&lt;P&gt;How can I change the extraction to replace '-' with '/' so that my values look like 2014/07/31 ?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 17:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165951#M47196</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2014-07-31T17:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace characters in string from field extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165952#M47197</link>
      <description>&lt;P&gt;Since this is a search time field extraction, you can use replace function in your search. The other way is replace it during data ingestion. Using the SEDCMD in props.conf file.&lt;/P&gt;

&lt;P&gt;I am not sure if it can be done along with EXTRACT-fieldname.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 19:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165952#M47197</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-31T19:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace characters in string from field extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165953#M47198</link>
      <description>&lt;P&gt;Indeed, &lt;CODE&gt;EXTRACT-foo&lt;/CODE&gt; doesn't do replacements. On top of &lt;CODE&gt;replace()&lt;/CODE&gt; in search and &lt;CODE&gt;SEDCMD-foo&lt;/CODE&gt; at index time you can also use &lt;CODE&gt;strptime()&lt;/CODE&gt; and &lt;CODE&gt;strftime()&lt;/CODE&gt; in search to parse your date and produce a different formatted string.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 22:54:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165953#M47198</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-01T22:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace characters in string from field extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165954#M47199</link>
      <description>&lt;P&gt;Thank you. I just wanted to check if we can do it during search time extraction&lt;/P&gt;</description>
      <pubDate>Sat, 02 Aug 2014 04:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165954#M47199</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2014-08-02T04:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace characters in string from field extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165955#M47200</link>
      <description>&lt;P&gt;You can of course define a calculated field (&lt;CODE&gt;EVAL-foo&lt;/CODE&gt; in props.conf) to avoid having to do the calculation in every search.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Aug 2014 10:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165955#M47200</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-02T10:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace characters in string from field extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165956#M47201</link>
      <description>&lt;P&gt;I have not tried, but can i use a replace in the EVAL-foo for search time extraction @martin_mueller ? i need to replace the newline character in that field but no answers till now &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Aug 2014 15:53:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165956#M47201</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-08-02T15:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace characters in string from field extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165957#M47202</link>
      <description>&lt;P&gt;Is this about &lt;A href="http://answers.splunk.com/answers/146092/how-do-i-ignore-the-new-line-character-in-the-_raw-field"&gt;http://answers.splunk.com/answers/146092/how-do-i-ignore-the-new-line-character-in-the-_raw-field&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Aug 2014 16:06:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-characters-in-string-from-field-extraction/m-p/165957#M47202</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-02T16:06:20Z</dc:date>
    </item>
  </channel>
</rss>

