<?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: Replace square brackets and leave original value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559118#M158847</link>
    <description>&lt;P&gt;Hi korstiaans,&lt;/P&gt;&lt;P&gt;you can try this:&lt;/P&gt;&lt;P&gt;|makeresults&lt;BR /&gt;|eval sample_field="[ \"842cef72-745d-463c-8b49-ce16ccc5ebd2\" ]"&lt;BR /&gt;|rex field=sample_field "\[\s\"(?&amp;lt;new_field&amp;gt;.*)?\""&lt;/P&gt;&lt;P&gt;I don´t know if you have realy spaces between the [ and "&lt;/P&gt;&lt;P&gt;Michel&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jul 2021 15:46:02 GMT</pubDate>
    <dc:creator>michel_wolf</dc:creator>
    <dc:date>2021-07-12T15:46:02Z</dc:date>
    <item>
      <title>Replace square brackets and leave original value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559115#M158845</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a field with the following value:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[ "842cef72-745d-463c-8b49-ce16ccc5ebd2" ]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'd like to get rid of the square brackets and the quotes ending up with:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;842cef72-745d-463c-8b49-ce16ccc5ebd2&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 15:36:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559115#M158845</guid>
      <dc:creator>korstiaans</dc:creator>
      <dc:date>2021-07-12T15:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Replace square brackets and leave original value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559118#M158847</link>
      <description>&lt;P&gt;Hi korstiaans,&lt;/P&gt;&lt;P&gt;you can try this:&lt;/P&gt;&lt;P&gt;|makeresults&lt;BR /&gt;|eval sample_field="[ \"842cef72-745d-463c-8b49-ce16ccc5ebd2\" ]"&lt;BR /&gt;|rex field=sample_field "\[\s\"(?&amp;lt;new_field&amp;gt;.*)?\""&lt;/P&gt;&lt;P&gt;I don´t know if you have realy spaces between the [ and "&lt;/P&gt;&lt;P&gt;Michel&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 15:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559118#M158847</guid>
      <dc:creator>michel_wolf</dc:creator>
      <dc:date>2021-07-12T15:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Replace square brackets and leave original value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559129#M158851</link>
      <description>&lt;P&gt;Hi Michel,&lt;/P&gt;&lt;P&gt;That doesn't work, but it's probably, because the field is a little weird formatted. It looks like this in a table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="splunk_answers.png" style="width: 371px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15049iB5B188F6F8F1ED77/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk_answers.png" alt="splunk_answers.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 16:35:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559129#M158851</guid>
      <dc:creator>korstiaans</dc:creator>
      <dc:date>2021-07-12T16:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Replace square brackets and leave original value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559135#M158855</link>
      <description>&lt;P&gt;(?&amp;lt;CAPTURE&amp;gt;[a-z0-9-\]+)&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 17:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559135#M158855</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2021-07-12T17:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Replace square brackets and leave original value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559136#M158856</link>
      <description>&lt;P&gt;Sorry- added incorrectly \&lt;/P&gt;&lt;P&gt;(?&amp;lt;CAPTURE&amp;gt;[a-z0-9-]+)&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 17:10:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559136#M158856</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2021-07-12T17:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Replace square brackets and leave original value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559137#M158857</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/5516"&gt;@clintla&lt;/a&gt;&amp;nbsp;Thanks, works like a charm.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 17:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replace-square-brackets-and-leave-original-value/m-p/559137#M158857</guid>
      <dc:creator>korstiaans</dc:creator>
      <dc:date>2021-07-12T17:19:20Z</dc:date>
    </item>
  </channel>
</rss>

