<?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 Requred in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706140#M116803</link>
    <description>&lt;P&gt;For the SPL you need to escape all backslashes and quotes. For regex101 it requires you to escape slashes by default (which is not a part of the regex requirement but part of the default PHP PCRE usage syntax). SEDCMD uses raw regex.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Dec 2024 13:35:10 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-12-06T13:35:10Z</dc:date>
    <item>
      <title>REGEX Requred</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706027#M116776</link>
      <description>&lt;P&gt;Hello Community&lt;/P&gt;&lt;P&gt;I need regex that can return extract the following fields only from event 4702:&lt;BR /&gt;1. &amp;lt;EventID&amp;gt;&amp;lt;/EventID&amp;gt;&lt;BR /&gt;2.&amp;lt;TimeCreated SystemTime='2024-12-05T14:59:44.9923272Z'/&amp;gt;&lt;/P&gt;&lt;P&gt;3.&amp;lt;Computer&amp;gt;Host&amp;lt;/Computer&amp;gt;&lt;/P&gt;&lt;P&gt;4.&amp;lt;Data Name='TaskName'&amp;gt;\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask&amp;lt;/Data&amp;gt;&lt;/P&gt;&lt;P&gt;from the following raw event:&lt;BR /&gt;&amp;lt;Event xmlns='&lt;A href="http://schemas.microsoft.com/win/2004/08/events/event" target="_blank"&gt;http://schemas.microsoft.com/win/2004/08/events/event&lt;/A&gt;'&amp;gt;&amp;lt;System&amp;gt;&amp;lt;Provider Name='Microsoft-Windows-Security-Auditing' Guid='{54849625-5478-4994-a5ba-3e3b0328c30d}'/&amp;gt;&amp;lt;EventID&amp;gt;4702&amp;lt;/EventID&amp;gt;&amp;lt;Version&amp;gt;1&amp;lt;/Version&amp;gt;&amp;lt;Level&amp;gt;0&amp;lt;/Level&amp;gt;&amp;lt;Task&amp;gt;12804&amp;lt;/Task&amp;gt;&amp;lt;Opcode&amp;gt;0&amp;lt;/Opcode&amp;gt;&amp;lt;Keywords&amp;gt;0x8020000000000000&amp;lt;/Keywords&amp;gt;&amp;lt;TimeCreated SystemTime='2024-12-05T14:59:44.9923272Z'/&amp;gt;&amp;lt;EventRecordID&amp;gt;2470365&amp;lt;/EventRecordID&amp;gt;&amp;lt;Correlation ActivityID='{625186de-46eb-0000-1689-5162eb46db01}'/&amp;gt;&amp;lt;Execution ProcessID='1408' ThreadID='1600'/&amp;gt;&amp;lt;Channel&amp;gt;Security&amp;lt;/Channel&amp;gt;&amp;lt;Computer&amp;gt;Host&amp;lt;/Computer&amp;gt;&amp;lt;Security/&amp;gt;&amp;lt;/System&amp;gt;&amp;lt;EventData&amp;gt;&amp;lt;Data Name='SubjectUserSid'&amp;gt;S-1-5-20&amp;lt;/Data&amp;gt;&amp;lt;Data Name='SubjectUserName'&amp;gt; Host $&amp;lt;/Data&amp;gt;&amp;lt;Data Name='SubjectDomainName'&amp;gt; Host &amp;lt;/Data&amp;gt;&amp;lt;Data Name='SubjectLogonId'&amp;gt;0x3e4&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TaskName'&amp;gt;\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TaskContentNew'&amp;gt;&amp;amp;lt;?xml version="1.0" encoding="UTF-16"?&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Task version="1.6" xmlns="&lt;A href="http://schemas.microsoft.com/windows/2004/02/mit/task" target="_blank"&gt;http://schemas.microsoft.com/windows/2004/02/mit/task&lt;/A&gt;"&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;RegistrationInfo&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Source&amp;amp;gt;$(@%systemroot%\system32\sppc.dll,-200)&amp;amp;lt;/Source&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Author&amp;amp;gt;$(@%systemroot%\system32\sppc.dll,-200)&amp;amp;lt;/Author&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Version&amp;amp;gt;1.0&amp;amp;lt;/Version&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Description&amp;amp;gt;$(@%systemroot%\system32\sppc.dll,-201)&amp;amp;lt;/Description&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;URI&amp;amp;gt;\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask&amp;amp;lt;/URI&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;SecurityDescriptor&amp;amp;gt;D:P(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)(A;;FR;;;S-1-5-87-2912274048-3994893941-1669128114-1310430903-1263774323)&amp;amp;lt;/SecurityDescriptor&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/RegistrationInfo&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Triggers&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;CalendarTrigger&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;StartBoundary&amp;amp;gt;2024-12-10T07:54:44Z&amp;amp;lt;/StartBoundary&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Enabled&amp;amp;gt;true&amp;amp;lt;/Enabled&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;ScheduleByDay&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;DaysInterval&amp;amp;gt;1&amp;amp;lt;/DaysInterval&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/ScheduleByDay&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/CalendarTrigger&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/Triggers&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Principals&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Principal id="NetworkService"&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;UserId&amp;amp;gt;S-1-5-20&amp;amp;lt;/UserId&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;RunLevel&amp;amp;gt;LeastPrivilege&amp;amp;lt;/RunLevel&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/Principal&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/Principals&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Settings&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;MultipleInstancesPolicy&amp;amp;gt;IgnoreNew&amp;amp;lt;/MultipleInstancesPolicy&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;DisallowStartIfOnBatteries&amp;amp;gt;true&amp;amp;lt;/DisallowStartIfOnBatteries&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;StopIfGoingOnBatteries&amp;amp;gt;true&amp;amp;lt;/StopIfGoingOnBatteries&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;AllowHardTerminate&amp;amp;gt;false&amp;amp;lt;/AllowHardTerminate&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;StartWhenAvailable&amp;amp;gt;true&amp;amp;lt;/StartWhenAvailable&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;RunOnlyIfNetworkAvailable&amp;amp;gt;false&amp;amp;lt;/RunOnlyIfNetworkAvailable&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;IdleSettings&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;StopOnIdleEnd&amp;amp;gt;true&amp;amp;lt;/StopOnIdleEnd&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;RestartOnIdle&amp;amp;gt;false&amp;amp;lt;/RestartOnIdle&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/IdleSettings&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;AllowStartOnDemand&amp;amp;gt;true&amp;amp;lt;/AllowStartOnDemand&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Enabled&amp;amp;gt;true&amp;amp;lt;/Enabled&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Hidden&amp;amp;gt;true&amp;amp;lt;/Hidden&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;RunOnlyIfIdle&amp;amp;gt;false&amp;amp;lt;/RunOnlyIfIdle&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;DisallowStartOnRemoteAppSession&amp;amp;gt;false&amp;amp;lt;/DisallowStartOnRemoteAppSession&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;UseUnifiedSchedulingEngine&amp;amp;gt;true&amp;amp;lt;/UseUnifiedSchedulingEngine&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;WakeToRun&amp;amp;gt;false&amp;amp;lt;/WakeToRun&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;ExecutionTimeLimit&amp;amp;gt;PT0S&amp;amp;lt;/ExecutionTimeLimit&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Priority&amp;amp;gt;7&amp;amp;lt;/Priority&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;RestartOnFailure&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Interval&amp;amp;gt;PT1M&amp;amp;lt;/Interval&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Count&amp;amp;gt;3&amp;amp;lt;/Count&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/RestartOnFailure&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/Settings&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Actions Context="NetworkService"&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;ComHandler&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;ClassId&amp;amp;gt;{B1AEBB5D-EAD9-4476-B375-9C3ED9F32AFC}&amp;amp;lt;/ClassId&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;Data&amp;amp;gt;&amp;amp;lt;![CDATA[timer]]&amp;amp;gt;&amp;amp;lt;/Data&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/ComHandler&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/Actions&amp;amp;gt;&lt;BR /&gt;&amp;amp;lt;/Task&amp;amp;gt;&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ClientProcessStartKey'&amp;gt;26177172834095606&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ClientProcessId'&amp;gt;2408&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ParentProcessId'&amp;gt;1368&amp;lt;/Data&amp;gt;&amp;lt;Data Name='RpcCallClientLocality'&amp;gt;0&amp;lt;/Data&amp;gt;&amp;lt;Data Name='FQDN'&amp;gt;Host&amp;lt;/Data&amp;gt;&amp;lt;/EventData&amp;gt;&amp;lt;/Event&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to be able to validate via | makeresults rex mod=sed.....&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 15:25:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706027#M116776</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2024-12-05T15:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX Requred</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706030#M116777</link>
      <description>&lt;P&gt;It would help to know what you've tried already and how those efforts failed to meet expectations.&lt;/P&gt;&lt;P&gt;Are you looking for a single regex or one for each field?&lt;/P&gt;&lt;P&gt;Do you plan to extract the fields at search time or index time?&amp;nbsp; If search time, have you tried using &lt;FONT face="courier new,courier"&gt;spath&lt;/FONT&gt; to parse the event?&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;rex mode=sed&lt;/FONT&gt; does not extract fields so it cannot be used to validate expressions.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 15:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706030#M116777</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-12-05T15:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX Requred</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706032#M116778</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;, thank you for your reply.&lt;/P&gt;&lt;P&gt;Apologies, I should have been a bit more descriptive.&lt;/P&gt;&lt;P&gt;I am trying to implement a SEDCMD in transforms.conf to reduce a single raw event's size, specifically by removing elements that will never be used while keeping the event intact for compliance purposes.&lt;/P&gt;&lt;P&gt;My intent is not to extract fields but to ensure that only the necessary elements remain in the raw event. A single regex that can clean up the event by removing unused parts while leaving the required fields would be ideal.&lt;/P&gt;&lt;P&gt;Thanks in advance for your guidance!&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;D Alex&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 16:21:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706032#M116778</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2024-12-05T16:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX Requred</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706037#M116779</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex mode=sed "s/(?ms).*(?&amp;lt;ei&amp;gt;\&amp;lt;EventID\&amp;gt;\d+\&amp;lt;\/EventID&amp;gt;).*(?&amp;lt;TimeCreated&amp;gt;\&amp;lt;TimeCreated SystemTime='[^']+'\/&amp;gt;).*(?&amp;lt;Computer&amp;gt;\&amp;lt;Computer\&amp;gt;[^\&amp;lt;]+\&amp;lt;\/Computer\&amp;gt;).*(?&amp;lt;TaskName&amp;gt;\&amp;lt;Data Name='TaskName'\&amp;gt;[^\&amp;lt;]+\&amp;lt;\/Data\&amp;gt;).*/\1\2\3\4/g"&lt;/LI-CODE&gt;&lt;P&gt;Caveat: XML sometimes has namespace aliases either embedded or used or both which a proper XML parser would understand but these are not shown in your sample and therefore not catered for in the regex&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 16:37:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706037#M116779</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-12-05T16:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX Requred</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706039#M116780</link>
      <description>&lt;P&gt;Thanks for clarifying.&amp;nbsp; Try this query.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex mode=sed "s:&amp;lt;EventID&amp;gt;4702&amp;lt;\/EventID&amp;gt;|&amp;lt;TimeCreated SystemTime='[^']+'\/&amp;gt;|&amp;lt;Computer&amp;gt;[^&amp;lt;]+&amp;lt;\/Computer&amp;gt;|&amp;lt;Data Name='[^']+'&amp;gt;[^&amp;lt;]+&amp;lt;\/Data&amp;gt;::g"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Dec 2024 16:46:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706039#M116780</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-12-05T16:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX Requred</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706137#M116800</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Please have a look at &lt;A href="https://regex101.com/r/wRe1Ai/1" target="_blank" rel="noopener"&gt;https://regex101.com/r/wRe1Ai/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;That works in 101regex web portal, but it does not work under the makeresults and SEDCMD in props.conf&lt;/P&gt;&lt;P&gt;I had to remove the&lt;/P&gt;&lt;PRE&gt;(?ms).*(?&amp;lt;ei&amp;gt;\&lt;/PRE&gt;&lt;P&gt;as SEDCMD s/ would not accept it neither &amp;lt;ei&amp;gt; bit.&lt;/P&gt;&lt;P&gt;Can you please work out the exact SEDCMD-reducing_4702=s/........g bit that will be compatible with the SEDCMD?&lt;/P&gt;&lt;P&gt;Also can you try that in Splunk e.g. getting the | makeresult SPL and see if the one SPL you provide would work/remove the unwanted parts from the event?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 12:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706137#M116800</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2024-12-06T12:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX Requred</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706138#M116801</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;Apologies, for the delay in replying but I had to test it.&lt;/P&gt;&lt;P&gt;Please see the results here: &lt;A href="https://regex101.com/r/7u6vAP/1" target="_blank"&gt;https://regex101.com/r/7u6vAP/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Now I need to figure out as I have asked &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; how to make both work the | makeresult | rex mode=sed ........ and the props SEDCMD-reducing_4702=? to work strip the event thus reducing its weight in bytes&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 12:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706138#M116801</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2024-12-06T12:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX Requred</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706139#M116802</link>
      <description>&lt;P&gt;Remove the ':' on the end of the regex and it should work.&lt;/P&gt;&lt;P&gt;You can't get &lt;FONT face="courier new,courier"&gt;| makeresults&lt;/FONT&gt; and props to work at the same time.&amp;nbsp; &lt;FONT face="courier new,courier"&gt;makeresults&lt;/FONT&gt; creates synthetic events and props only work on real events.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 13:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706139#M116802</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-12-06T13:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX Requred</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706140#M116803</link>
      <description>&lt;P&gt;For the SPL you need to escape all backslashes and quotes. For regex101 it requires you to escape slashes by default (which is not a part of the regex requirement but part of the default PHP PCRE usage syntax). SEDCMD uses raw regex.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 13:35:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-Requred/m-p/706140#M116803</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-12-06T13:35:10Z</dc:date>
    </item>
  </channel>
</rss>

