<?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 Question about replace(X,Y,Z) function in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507966#M141978</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Scott_Wang_0-1594181414473.png" style="width: 694px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9552i9622A76757057F2A/image-dimensions/694x85?v=v2" width="694" height="85" role="button" title="Scott_Wang_0-1594181414473.png" alt="Scott_Wang_0-1594181414473.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm kind of new in Splunk and found one syntax of &lt;STRONG&gt;replace&lt;/STRONG&gt; when I read the official document. Here is the link&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/TextFunctions" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/TextFunctions&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please tell me where to find the syntax like "\2/\1/"? It's my first time to see something like this, and I did not find any document about this kind of syntax.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2020 04:14:32 GMT</pubDate>
    <dc:creator>Scott_Wang</dc:creator>
    <dc:date>2020-07-08T04:14:32Z</dc:date>
    <item>
      <title>Question about replace(X,Y,Z) function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507966#M141978</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Scott_Wang_0-1594181414473.png" style="width: 694px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9552i9622A76757057F2A/image-dimensions/694x85?v=v2" width="694" height="85" role="button" title="Scott_Wang_0-1594181414473.png" alt="Scott_Wang_0-1594181414473.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm kind of new in Splunk and found one syntax of &lt;STRONG&gt;replace&lt;/STRONG&gt; when I read the official document. Here is the link&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/TextFunctions" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/TextFunctions&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please tell me where to find the syntax like "\2/\1/"? It's my first time to see something like this, and I did not find any document about this kind of syntax.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 04:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507966#M141978</guid>
      <dc:creator>Scott_Wang</dc:creator>
      <dc:date>2020-07-08T04:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Question about replace(X,Y,Z) function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507970#M141982</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222778"&gt;@Scott_Wang&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Those are regular expressions.&lt;/P&gt;&lt;P&gt;For the specific example, it interchanges the position of month and date&lt;/P&gt;&lt;P&gt;i.e&lt;/P&gt;&lt;P&gt;Applying&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"^(\d{1,2})/(\d{1,2})/"&lt;/LI-CODE&gt;&lt;P&gt;on 1/14/2017 will yield 1 in 1st position and 14 in 2nd position and "\2/\1/" will result in 14/1/2017&lt;/P&gt;&lt;P&gt;References:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/8.0.2004/SearchReference/Regex" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/SplunkCloud/8.0.2004/SearchReference/Regex&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.4/Knowledge/AboutSplunkregularexpressions" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.4/Knowledge/AboutSplunkregularexpressions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 04:36:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507970#M141982</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-08T04:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Question about replace(X,Y,Z) function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507971#M141983</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;renjith_nair,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I understand that this command will interchange the position of month and date. But it seems the first time I see something like "\2/\1/". Could you please tell me when we could use something like that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 04:41:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507971#M141983</guid>
      <dc:creator>Scott_Wang</dc:creator>
      <dc:date>2020-07-08T04:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Question about replace(X,Y,Z) function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507972#M141984</link>
      <description>&lt;P&gt;See the link from your posted link to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.4/Search/SPLandregularexpressions" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.4/Search/SPLandregularexpressions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;where it discusses and provides more links about Splunk and PCRE regular expressions.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 05:10:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507972#M141984</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-07-08T05:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Question about replace(X,Y,Z) function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507973#M141985</link>
      <description>&lt;P&gt;It's the third argument and its a reference group that are matched in the regex. So you can use it when your regex in the second argument results reference group.&lt;/P&gt;&lt;P&gt;Here is a simple example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults|eval text="first-second-third"|eval replacedText=replace(text,"(\w+)-(\w+)-(\w+)","\3-\2-\1")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 05:11:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-about-replace-X-Y-Z-function/m-p/507973#M141985</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-08T05:11:48Z</dc:date>
    </item>
  </channel>
</rss>

