<?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: Regex help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317416#M94939</link>
    <description>&lt;P&gt;@niketnilay its worked. but i want from workflow name also. how to get it.&lt;/P&gt;

&lt;P&gt;other rows doesn't have word workflow which we are looking. so if that row doesnt have word workflow. i want dont want that row to have other text . i want as empty or NA. pls help&lt;/P&gt;</description>
    <pubDate>Tue, 05 Sep 2017 10:02:38 GMT</pubDate>
    <dc:creator>DataOrg</dc:creator>
    <dc:date>2017-09-05T10:02:38Z</dc:date>
    <item>
      <title>Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317414#M94937</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;CCDSRiERRSTAFGRT||FUNC||u505||PA1RA2M||STCK|Workflow: threat call workplace||ATdT|||AC1CSED
CCDSRiERRSTAFGRT||FUNC||u505||PA1RA2M||STCK|Workflow: workplace management||ATdT|||AC1CSED
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want only  from Workflow to first pipe present " from the above text and i want to select from starting workflow and it should end in pipe symboll&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 09:45:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317414#M94937</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-09-05T09:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317415#M94938</link>
      <description>&lt;P&gt;@premranjithj, can you please try the following and confirm?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=_raw "\|Workflow: (?&amp;lt;Workflow&amp;gt;[^\|]+)\|"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Sep 2017 09:54:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317415#M94938</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-09-05T09:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317416#M94939</link>
      <description>&lt;P&gt;@niketnilay its worked. but i want from workflow name also. how to get it.&lt;/P&gt;

&lt;P&gt;other rows doesn't have word workflow which we are looking. so if that row doesnt have word workflow. i want dont want that row to have other text . i want as empty or NA. pls help&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 10:02:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317416#M94939</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-09-05T10:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317417#M94940</link>
      <description>&lt;P&gt;@premranjithj, can you add samples of rows without workflow.&lt;/P&gt;

&lt;P&gt;What is &lt;CODE&gt;STCK&lt;/CODE&gt;? What kind of values can i have?&lt;/P&gt;

&lt;P&gt;Or else can you confirm whether it is always the 9th pipe &lt;CODE&gt;(|)&lt;/CODE&gt; that will have Workflow name? In that case you can use&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval data=split(_raw,"|")
| eval workflow=mvindex(data,9)
| eval workflow=case(match(workflow,"Workflow"),workflow,"N/A")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In fact you should take care of this while ingesting the data and index it with Delimited String (Pipe Separated Value) so that all fields are already extracted during search time field discovery.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 10:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317417#M94940</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-09-05T10:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317418#M94941</link>
      <description>&lt;P&gt;hi @niketnilay  it will not be always be 9th pipe that will have workflow.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 11:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317418#M94941</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-09-05T11:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317419#M94942</link>
      <description>&lt;P&gt;@premranjithj, then you would definitely need to add more samples. Even for regular expression you would need to know before or after pattern.&lt;/P&gt;

&lt;P&gt;For using delimeter you would need to know which position/s it might be present.&lt;/P&gt;

&lt;P&gt;So, besides above one more question: will workflow always have name Workflow in it?&lt;/P&gt;

&lt;P&gt;Since you own the data, you will have to tell us the pattern/s of data so that we can help you with regex. Unfortunately it can not be the other way around. Hope you understand.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 11:10:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317419#M94942</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-09-05T11:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317420#M94943</link>
      <description>&lt;P&gt;yes always workflow will have the same name and only one time its present&lt;BR /&gt;
so we have to keep workflow as base to find&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 11:16:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317420#M94943</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-09-05T11:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317421#M94944</link>
      <description>&lt;P&gt;As requested can you add few samples or events without Workflow as well?&lt;/P&gt;

&lt;P&gt;I have added an updated query to prefix "Workflow: " for workflow or set as "N/A" otherwise. Please try out and confirm.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 11:33:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317421#M94944</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-09-05T11:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317422#M94945</link>
      <description>&lt;P&gt;Is following query what you need?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "\|Workflow: (?&amp;lt;Workflow&amp;gt;[^\|]+)\|"
| eval Workflow=case(searchmatch("|Workflow: "),"Workflow: ".Workflow, true(),"N/A")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Sep 2017 11:36:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317422#M94945</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-09-05T11:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317423#M94946</link>
      <description>&lt;P&gt;below are the samples&lt;BR /&gt;
DOSTART||TECH||()--()||Error while other 'sequence', set 'sink' at step 'SWIfkdslTCH ON ?'.() -- Method 'help' of answered 'O&lt;/P&gt;

&lt;P&gt;An occurred in service 'sequence' Order failed (incifdffdsdent is on time to check()&lt;/P&gt;

&lt;P&gt;An err occurred in service |TECH|PARs||STCK|Workflow: automated||promots|physical&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 11:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317423#M94946</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-09-05T11:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317424#M94947</link>
      <description>&lt;P&gt;| eval Workflow=case(searchmatch("|Workflow: "),"Workflow: ".Workflow, true(),"N/A")&lt;BR /&gt;
 this statement nt working&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 13:16:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317424#M94947</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-09-05T13:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317425#M94948</link>
      <description>&lt;P&gt;Try this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "|(&amp;lt;workflow&amp;gt;Workflow: [^|]*)|" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Sep 2017 14:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317425#M94948</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-05T14:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317426#M94949</link>
      <description>&lt;P&gt;I tried following run anywhere search which worked fine. I just cooked up one event without Workflow:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults
|  eval data="CCDSRiERRSTAFGRT||FUNC||u505||PA1RA2M||STCK|Workflow: threat call workplace||ATdT|||AC1CSED;CCDSRiERRSTAFGRT||FUNC||u505||PA1RA2M||STCK| threat call workplace||ATdT|||AC1CSED;CCDSRiERRSTAFGRT||FUNC||u505||PA1RA2M||STCK|Workflow: workplace management||ATdT|||AC1CSED"
|  eval data=split(data,";")
|  mvexpand data
|  rename data as _raw
|  rex field=_raw "\|Workflow: (?&amp;lt;Workflow&amp;gt;[^\|]+)\|"
|  eval Workflow=case(searchmatch("|Workflow: "),"Workflow: ".Workflow, true(),"N/A")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Sep 2017 14:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/317426#M94949</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-09-05T14:37:45Z</dc:date>
    </item>
  </channel>
</rss>

