<?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 SOS! in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142329#M39482</link>
    <description>&lt;P&gt;You want to get all the values in quotes as a single field?&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2014 19:53:14 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-02-07T19:53:14Z</dc:date>
    <item>
      <title>Regex SOS!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142326#M39479</link>
      <description>&lt;P&gt;I'm trying to match everything in quotes in the following log file example. I've been working on this for a while and am desperate! &lt;/P&gt;

&lt;P&gt;This regex matches the first item in quotes in a given event (but I want to match everything).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((?:[^ \n]* ){1,8}'(?P&amp;lt;sis_audit_type&amp;gt;[^']+))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would have thought that this regex works but it gives an error: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;([^]+:[^]+:\s[^]+'(?P&amp;lt;sis_audit_type&amp;gt;[^]+)'){1,5}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My example log file is attached and pasted below. Thanks!&lt;IMG src="http://answers.splunk.com//storage/log_file.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;2014-02-03 05:26:53 - User: SiteScope Administrator. Operation performed: logged in.&lt;BR /&gt;
2014-02-03 10:19:20 - User: SiteScope Administrator. Operation performed: Username and password do not match. Failed to login.&lt;BR /&gt;
2014-02-03 10:19:24 - User: SiteScope Administrator. Operation performed: logged in.&lt;BR /&gt;
2014-02-03 11:44:33 - User: SiteScope Administrator. Operation performed: logged in.&lt;BR /&gt;
2014-02-03 11:53:54 - User: SiteScope Administrator. Operation performed: logged in.&lt;BR /&gt;
2014-02-03 12:10:17 - User: SiteScope Administrator. Operation performed: Alert 'sound' created in 'SiteScope\Test\google.com'.&lt;BR /&gt;
2014-02-03 12:10:43 - User: SiteScope Administrator. Operation performed: UPDATE Monitor 'SiteScope\Test\google.com' start:&lt;BR /&gt;
2014-02-03 12:10:43 - User: SiteScope Administrator. Operation performed: Monitor 'SiteScope\Test\google.com' update: '_classifier2' updated from '' to 'percentGood != 0   error   every day, all day'.&lt;BR /&gt;
2014-02-03 12:10:43 - User: SiteScope Administrator. Operation performed: Monitor 'SiteScope\Test\google.com' update: '_classifier1' updated from 'percentGood == 0 error   every day, all day' to ''.&lt;BR /&gt;
2014-02-03 12:10:43 - User: SiteScope Administrator. Operation performed: UPDATE Monitor 'SiteScope\Test\google.com' end.&lt;BR /&gt;
2014-02-03 12:10:43 - User: SiteScope Administrator. Operation performed: MANUAL RUN for monitor 'SiteScope\Test\google.com'.&lt;BR /&gt;
2014-02-03 12:20:18 - User: SiteScope Administrator. Operation performed: MODIFY Acknowledgment on 'SiteScope\Test\google.com' start:&lt;BR /&gt;
2014-02-03 12:20:18 - User: SiteScope Administrator. Operation performed: Acknowledgment 'ack google' was added to 'SiteScope\Test\google.com'&lt;BR /&gt;
2014-02-03 12:20:18 - User: SiteScope Administrator. Operation performed: UPDATE Monitor 'SiteScope\Test\google.com' start:&lt;BR /&gt;
2014-02-03 12:20:18 - User: SiteScope Administrator. Operation performed: UPDATE Monitor 'SiteScope\Test\google.com' end.&lt;BR /&gt;
2014-02-03 12:20:18 - User: SiteScope Administrator. Operation performed: MODIFY Acknowledgment on 'SiteScope\Test\google.com' end.&lt;BR /&gt;
2014-02-03 13:22:42 - User: SiteScope Administrator. Operation performed: logged in.&lt;BR /&gt;
2014-02-03 13:28:00 - User: SiteScope Administrator. Operation performed: logged out.&lt;BR /&gt;
2014-02-03 13:28:10 - User: . Operation performed: Username and password do not match. Failed to login.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:49:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142326#M39479</guid>
      <dc:creator>sdorich</dc:creator>
      <dc:date>2020-09-28T15:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Regex SOS!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142327#M39480</link>
      <description>&lt;P&gt;It'd be much easier to debug this if you could post sample events as text instead. That way it's easy to try to create a matching regex on &lt;A href="http://regexpal.com/"&gt;http://regexpal.com/&lt;/A&gt; or something similar.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2014 17:56:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142327#M39480</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-02-07T17:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Regex SOS!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142328#M39481</link>
      <description>&lt;P&gt;Just added the sample events (each timestamp represents a new event). Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2014 18:46:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142328#M39481</guid>
      <dc:creator>sdorich</dc:creator>
      <dc:date>2014-02-07T18:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Regex SOS!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142329#M39482</link>
      <description>&lt;P&gt;You want to get all the values in quotes as a single field?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2014 19:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142329#M39482</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-02-07T19:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regex SOS!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142330#M39483</link>
      <description>&lt;P&gt;yes. I'd like (if possible) all the values in quotes as a single field.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2014 19:59:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142330#M39483</guid>
      <dc:creator>sdorich</dc:creator>
      <dc:date>2014-02-07T19:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regex SOS!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142331#M39484</link>
      <description>&lt;P&gt;try this&lt;/P&gt;

&lt;P&gt;yourbase search | rex max_match=0 "'(?&lt;SIS_AUDIT_TYPE&gt;.*)'" |  nomv sis_audit_type&lt;/SIS_AUDIT_TYPE&gt;&lt;/P&gt;

&lt;P&gt;To see if you get correct values.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:50:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142331#M39484</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-28T15:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regex SOS!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142332#M39485</link>
      <description>&lt;P&gt;Thanks! I tried it and was close but I got everything in b/w the values with quotes. For example, I got this:&lt;/P&gt;

&lt;P&gt;ack google' was added to 'SiteScopeTestgoogle.com'&lt;/P&gt;

&lt;P&gt;but what I'd really like are the following 2 separate values:&lt;/P&gt;

&lt;P&gt;ack google &lt;BR /&gt;
SSiteScopeTestgoogle.com&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2014 20:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142332#M39485</guid>
      <dc:creator>sdorich</dc:creator>
      <dc:date>2014-02-07T20:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regex SOS!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142333#M39486</link>
      <description>&lt;P&gt;Try this one.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yourbase search | rex max_match=0 "'(?&amp;lt;sis_audit_type&amp;gt;[^']*)'\s"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Feb 2014 20:58:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142333#M39486</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-02-07T20:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex SOS!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142334#M39487</link>
      <description>&lt;P&gt;Thank you! I think that worked pretty well! One question: how can I use that as a regular expression in say props.conf? I tried this:&lt;/P&gt;

&lt;P&gt;EXTRACT-Audit Type = '(?&lt;SIS_AUDIT_TYPE&gt;[^']*)'\s&lt;/SIS_AUDIT_TYPE&gt;&lt;/P&gt;

&lt;P&gt;but that didn't work.. It seems to only work with the rex search command. Is there something I need to modify to use it in props.conf?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2014 15:32:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-SOS/m-p/142334#M39487</guid>
      <dc:creator>sdorich</dc:creator>
      <dc:date>2014-02-14T15:32:38Z</dc:date>
    </item>
  </channel>
</rss>

