<?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: conditional regex help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587266#M204542</link>
    <description>&lt;P&gt;that looks good but i'm trying to create an inline extraction (props.conf) for this. so it only returns that info&lt;/P&gt;</description>
    <pubDate>Wed, 02 Mar 2022 16:30:37 GMT</pubDate>
    <dc:creator>sdee1013</dc:creator>
    <dc:date>2022-03-02T16:30:37Z</dc:date>
    <item>
      <title>Conditional regex help: How to capture two groups if they have an "exclusion type"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587249#M204531</link>
      <description>&lt;P&gt;hi everyone,&lt;/P&gt;
&lt;P&gt;i'm trying to parse json inline.&amp;nbsp; i'm using kv mode= json already but i'm trying to achieve selective groups.&lt;/P&gt;
&lt;P&gt;essentially i want to capture two groups if they have an "exclusion type"&lt;/P&gt;
&lt;P&gt;sample json.&lt;/P&gt;
&lt;P&gt;[{"ruleGroupId":"AWS#AWSManagedRulesAmazonIpReputationList","terminatingRule":null,"nonTerminatingMatchingRules":[],"excludedRules":null},{"ruleGroupId":"AWS#AWSManagedRulesBotControlRuleSet","terminatingRule":null,"nonTerminatingMatchingRules":[],"excludedRules":null},{"ruleGroupId":"AWS#AWSManagedRulesCommonRuleSet","terminatingRule":null,"nonTerminatingMatchingRules":[],"excludedRules":[{"exclusionType":"EXCLUDED_AS_COUNT","ruleId":"SizeRestrictions_BODY"}]},{"ruleGroupId":"AWS#AWSManagedRulesKnownBadInputsRuleSet","terminatingRule":null,"nonTerminatingMatchingRules":[],"excludedRules":null}]&lt;/P&gt;
&lt;P&gt;so for this i wanted to capture only the ruleGroupId name if it has excludedRules not null, then capture the exclusionType&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any help would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 00:16:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587249#M204531</guid>
      <dc:creator>sdee1013</dc:creator>
      <dc:date>2022-03-03T00:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: conditional regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587257#M204536</link>
      <description>&lt;P&gt;i just uploaded your data and assigned the sourcetype as _json&lt;/P&gt;&lt;P&gt;and ran the below query&lt;/P&gt;&lt;P&gt;index="newjson" sourcetype="_json" NOT excludedRules=null |table ruleGroupId ,"excludedRules{}.exclusionType"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="venky1544_1-1646235752668.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18219i26761EFFFF717F37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="venky1544_1-1646235752668.png" alt="venky1544_1-1646235752668.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note: you can rename the field as per your requirement&amp;nbsp;&lt;/P&gt;&lt;P&gt;is this what you wanted&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 15:43:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587257#M204536</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2022-03-02T15:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: conditional regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587266#M204542</link>
      <description>&lt;P&gt;that looks good but i'm trying to create an inline extraction (props.conf) for this. so it only returns that info&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 16:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587266#M204542</guid>
      <dc:creator>sdee1013</dc:creator>
      <dc:date>2022-03-02T16:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: conditional regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587267#M204543</link>
      <description>&lt;P&gt;let me add the whole json...this is actually nested.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"timestamp": 1646229254523,&lt;BR /&gt;"formatVersion": 1,&lt;BR /&gt;"webaclId": "arn:aws:wafv2:us-east-1:111111:regional/webacl/alb-stage-web-acl/26ac170c-03c4-4fd7-8fab-86e346789fef",&lt;BR /&gt;"terminatingRuleId": "Default_Action",&lt;BR /&gt;"terminatingRuleType": "REGULAR",&lt;BR /&gt;"action": "ALLOW",&lt;BR /&gt;"terminatingRuleMatchDetails": [],&lt;BR /&gt;"httpSourceName": "ALB",&lt;BR /&gt;"httpSourceId": "182116744736-app/ALB-Stage/fcc1f5f9483b035e",&lt;BR /&gt;"ruleGroupList": [&lt;BR /&gt;{&lt;BR /&gt;"ruleGroupId": "AWS#AWSManagedRulesAmazonIpReputationList",&lt;BR /&gt;"terminatingRule": null,&lt;BR /&gt;"nonTerminatingMatchingRules": [],&lt;BR /&gt;"excludedRules": null&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"ruleGroupId": "AWS#AWSManagedRulesBotControlRuleSet",&lt;BR /&gt;"terminatingRule": null,&lt;BR /&gt;"nonTerminatingMatchingRules": [],&lt;BR /&gt;"excludedRules": null&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"ruleGroupId": "AWS#AWSManagedRulesCommonRuleSet",&lt;BR /&gt;"terminatingRule": null,&lt;BR /&gt;"nonTerminatingMatchingRules": [],&lt;BR /&gt;"excludedRules": [&lt;BR /&gt;{&lt;BR /&gt;"exclusionType": "EXCLUDED_AS_COUNT",&lt;BR /&gt;"ruleId": "SizeRestrictions_BODY"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"ruleGroupId": "AWS#AWSManagedRulesKnownBadInputsRuleSet",&lt;BR /&gt;"terminatingRule": null,&lt;BR /&gt;"nonTerminatingMatchingRules": [],&lt;BR /&gt;"excludedRules": null&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"rateBasedRuleList": [],&lt;BR /&gt;"nonTerminatingMatchingRules": [],&lt;BR /&gt;"requestHeadersInserted": null,&lt;BR /&gt;"responseCodeSent": null,&lt;BR /&gt;"httpRequest": {&lt;BR /&gt;"clientIp": "67.218.14.10",&lt;BR /&gt;"country": "US",&lt;BR /&gt;"headers": [&lt;BR /&gt;{&lt;BR /&gt;"name": "host",&lt;BR /&gt;"value": "sample.com"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "content-length",&lt;BR /&gt;"value": "50362"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "cache-control",&lt;BR /&gt;"value": "max-age=0"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "sec-ch-ua",&lt;BR /&gt;"value": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"98\", \"Microsoft Edge\";v=\"98\""&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "sec-ch-ua-mobile",&lt;BR /&gt;"value": "?0"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "sec-ch-ua-platform",&lt;BR /&gt;"value": "\"Windows\""&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "origin",&lt;BR /&gt;"value": "&lt;A href="https://sample.com" target="_blank"&gt;https://sample.com&lt;/A&gt;"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "upgrade-insecure-requests",&lt;BR /&gt;"value": "1"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "dnt",&lt;BR /&gt;"value": "1"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "content-type",&lt;BR /&gt;"value": "multipart/form-data; boundary=----WebKitFormBoundaryuXOFvh7iQjJkEJHm"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "user-agent",&lt;BR /&gt;"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 Edg/98.0.1108.62"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "accept",&lt;BR /&gt;"value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "sec-fetch-site",&lt;BR /&gt;"value": "same-origin"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "sec-fetch-mode",&lt;BR /&gt;"value": "navigate"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "sec-fetch-user",&lt;BR /&gt;"value": "?1"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "sec-fetch-dest",&lt;BR /&gt;"value": "document"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "referer",&lt;BR /&gt;"value": "&lt;A href="https://sample.com/DischargeDetail.aspx" target="_blank"&gt;https://sample.com/DischargeDetail.aspx&lt;/A&gt;"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "accept-encoding",&lt;BR /&gt;"value": "gzip, deflate, br"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "accept-language",&lt;BR /&gt;"value": "en-US,en;q=0.9"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "cookie",&lt;BR /&gt;"value": "_ga=GA1.3.84334902.1642521795; __RequestVerificationToken=-8kinKddCjKCZTws-wPmXDZTFg39urggswPnYm5Y15UwfIjspHqTj1hOPAXIaRPHL2cupyt2vO4Gb5QUExZGd6e5djS0v81kxt2pH22Ow9XiJYr2NPWB_BdQb-VmCUHVXbiVZZ5NwTfGDrXd2O0uD_gba4fM3PhkQUO5f9zs5381; _gid=GA1.2.249665053.1645964709; _ga_33R15ZN4N1=GS1.1.1645965393.6.0.1645965397.56; _ga=GA1.2.84334902.1642521795; ASP.NET_SessionId=1fnikipv2poi14r3doy4kb2w"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"uri": "/ReleaseRequest.aspx",&lt;BR /&gt;"args": "",&lt;BR /&gt;"httpVersion": "HTTP/2.0",&lt;BR /&gt;"httpMethod": "POST",&lt;BR /&gt;"requestId": "1-621f7706-5e8f4ea33e2dc0cc66b98797"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 16:39:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587267#M204543</guid>
      <dc:creator>sdee1013</dc:creator>
      <dc:date>2022-03-02T16:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: conditional regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587301#M204554</link>
      <description>&lt;P&gt;See if this helps:&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/xVgyru/1" target="_blank"&gt;https://regex101.com/r/xVgyru/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 19:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587301#M204554</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-03-02T19:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: conditional regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587305#M204555</link>
      <description>&lt;P&gt;works when its parsed but not in raw .&amp;nbsp; new lines aren't valid.&amp;nbsp; &amp;nbsp; here it is in raw: tried to work around it but my regex is horrible...lol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"timestamp":1646240486931,"formatVersion":1,"webaclId":"arn:aws:wafv2:us-east-1:111111:regional/webacl/alb-prod-web-acl/24e4f178-f008-434a-80f4-cd16728b9ffd","terminatingRuleId":"Default_Action","terminatingRuleType":"REGULAR","action":"ALLOW","terminatingRuleMatchDetails":[],"httpSourceName":"ALB","httpSourceId":"111111-app/site-internal-alb-production/07fae64dff77a3b3","ruleGroupList":[{"ruleGroupId":"AWS#AWSManagedRulesAmazonIpReputationList","terminatingRule":null,"nonTerminatingMatchingRules":[],"excludedRules":null},{"ruleGroupId":"AWS#AWSManagedRulesBotControlRuleSet","terminatingRule":null,"nonTerminatingMatchingRules":[],"excludedRules":[{"exclusionType":"EXCLUDED_AS_COUNT","ruleId":"CategorySocialMedia"},{"exclusionType":"EXCLUDED_AS_COUNT","ruleId":"SignalNonBrowserUserAgent"}]},{"ruleGroupId":"AWS#AWSManagedRulesKnownBadInputsRuleSet","terminatingRule":null,"nonTerminatingMatchingRules":[],"excludedRules":null},{"ruleGroupId":"AWS#AWSManagedRulesCommonRuleSet","terminatingRule":null,"nonTerminatingMatchingRules":[],"excludedRules":null}],"rateBasedRuleList":[],"nonTerminatingMatchingRules":[],"requestHeadersInserted":null,"responseCodeSent":null,"httpRequest":{"clientIp":"10.10.1.127","country":"-","headers":[{"name":"Accept-Encoding","value":"gzip"},{"name":"User-Agent","value":"facebookexternalhit/1.1 (+&lt;A href="http://www.facebook.com/externalhit_uatext.php" target="_blank"&gt;http://www.facebook.com/externalhit_uatext.php&lt;/A&gt;)"},{"name":"X-BufferBot","value":"Being Awesome! P.S. We're hiring! buffer.com/journey"},{"name":"cookie","value":"_bit=m21bv9-710b10c6d1aad7e0f7-00o"},{"name":"x-datadog-trace-id","value":"272920074770865622"},{"name":"x-datadog-parent-id","value":"827293848173300227"},{"name":"x-datadog-sampled","value":"1"},{"name":"x-datadog-sampling-priority","value":"0"},{"name":"host","value":"&lt;A href="http://www.site.com" target="_blank"&gt;www.site.com&lt;/A&gt;"},{"name":"Connection","value":"close"}],"uri":"/ana/training-technical-assistance/using-grantsgov-workspace","args":"","httpVersion":"HTTP/1.1","httpMethod":"GET","requestId":"1-621fa2e6-49f36a5f01f555c90fe7e63e"},"labels":[{"name":"awswaf:managed:aws:bot-control:bot:category:social_media"},{"name":"awswaf:managed:aws:bot-control:bot:name:facebook"},{"name":"awswaf:managed:aws:bot-control:signal:non_browser_user_agent"}]}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 20:45:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conditional-regex-help-How-to-capture-two-groups-if-they-have-an/m-p/587305#M204555</guid>
      <dc:creator>sdee1013</dc:creator>
      <dc:date>2022-03-02T20:45:22Z</dc:date>
    </item>
  </channel>
</rss>

