{"id":43466,"date":"2021-09-22T15:52:47","date_gmt":"2021-09-22T15:52:47","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=43466"},"modified":"2021-09-22T15:52:47","modified_gmt":"2021-09-22T15:52:47","slug":"answer-by-warren-for-splunk-why-is-it-not-counting-by-field","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=43466","title":{"rendered":"Answer by warren for Splunk &#8211; Why is it not counting by field?"},"content":{"rendered":"<p>You can, most likely, <em>greatly<\/em> simplify your regex<\/p>\n<p>For example:<\/p>\n<pre><code>| rex field=_raw &quot;Id\\W+(?&lt;id&gt;\\w+)&quot;\n<\/code><\/pre>\n<p>Will look for the literal string &quot;<code>Id<\/code>&quot;, followed by as many non-word (&quot;<code>\\W+<\/code>&quot;) characters as it finds, then put all of the word characters (&quot;<code>\\w+<\/code>&quot;) it sees into the new field <code>id<\/code><\/p>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/69286252\/splunk-why-is-it-not-counting-by-field\/69287527#69287527<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can, most likely, greatly simplify your regex For example: | rex field=_raw &quot;Id\\W+(?&lt;id&gt;\\w+)&quot; Will look for the literal string &quot;Id&quot;, followed by as many non-word (&quot;\\W+&quot;) characters as it finds, then put all of the word characters (&quot;\\w+&quot;) it sees into the new field id from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/69286252\/splunk-why-is-it-not-counting-by-field\/69287527#69287527 via IFTTT<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[991],"keyring_services":[],"class_list":["post-43466","post","type-post","status-publish","format-standard","hentry","category-blih","tag-stackexchange"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/43466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=43466"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/43466\/revisions"}],"predecessor-version":[{"id":43467,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/43466\/revisions\/43467"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43466"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=43466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}