<?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 Regex formating help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-formating-help/m-p/354458#M104929</link>
    <description>&lt;P&gt;Can anyone help me format a regular expression for Splunk? &lt;BR /&gt;
I can create the regular expression using regexr.com and I have 2 non-capturing groups and a capturing group, but I am not sure how to format the regular expression for splunk. &lt;BR /&gt;
Any tips or help you can provide is appreciated. &lt;/P&gt;

&lt;P&gt;Here is my string: &lt;BR /&gt;
string1="First Name (DEPT-User) account provisioned"&lt;BR /&gt;
And the regex: &lt;BR /&gt;
(:?string1=")([A-Za-z0-9() -]+)(:?account provisioned")&lt;BR /&gt;
Thanks, &lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2017 13:14:32 GMT</pubDate>
    <dc:creator>AHEARNJ</dc:creator>
    <dc:date>2017-08-08T13:14:32Z</dc:date>
    <item>
      <title>Regex formating help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-formating-help/m-p/354458#M104929</link>
      <description>&lt;P&gt;Can anyone help me format a regular expression for Splunk? &lt;BR /&gt;
I can create the regular expression using regexr.com and I have 2 non-capturing groups and a capturing group, but I am not sure how to format the regular expression for splunk. &lt;BR /&gt;
Any tips or help you can provide is appreciated. &lt;/P&gt;

&lt;P&gt;Here is my string: &lt;BR /&gt;
string1="First Name (DEPT-User) account provisioned"&lt;BR /&gt;
And the regex: &lt;BR /&gt;
(:?string1=")([A-Za-z0-9() -]+)(:?account provisioned")&lt;BR /&gt;
Thanks, &lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 13:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-formating-help/m-p/354458#M104929</guid>
      <dc:creator>AHEARNJ</dc:creator>
      <dc:date>2017-08-08T13:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Regex formating help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-formating-help/m-p/354459#M104930</link>
      <description>&lt;P&gt;Does your data contain &lt;CODE&gt;string1="First Name (DEPT-User) account provisioned"&lt;/CODE&gt;? Ideally Splunk should have automatically identified this as key value pair during search time. Which implies you would need to create field extraction/rex on string1. Have you checked &lt;CODE&gt;Interesting Fields&lt;/CODE&gt; in Verbose mode whether &lt;CODE&gt;string1&lt;/CODE&gt; field is already available or not? Which is the field you want to extract?&lt;/P&gt;

&lt;P&gt;If you want to extract &lt;CODE&gt;First Name (DEPT-User)&lt;/CODE&gt;, following rex should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt; 
| rex field=_raw "string1=\"(?&amp;lt;Data&amp;gt;[^\)]+\)) account provisioned\""
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Aug 2017 16:32:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-formating-help/m-p/354459#M104930</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-08T16:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regex formating help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-formating-help/m-p/354460#M104931</link>
      <description>&lt;P&gt;@AHEARNJ, I have converted comment to answer. Please accept to mark as answered!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 17:10:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-formating-help/m-p/354460#M104931</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-08T17:10:48Z</dc:date>
    </item>
  </channel>
</rss>

