{"id":61000,"date":"2022-07-26T16:42:53","date_gmt":"2022-07-26T16:42:53","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=61000"},"modified":"2022-07-26T16:42:53","modified_gmt":"2022-07-26T16:42:53","slug":"answer-by-warren-for-splunk-rex-search-unable-to-tabulate-because-of-null","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=61000","title":{"rendered":"Answer by warren for Splunk rex Search &#8211; Unable to tabulate because of NULL"},"content":{"rendered":"<p>Checking your regex on regex101 shows that it fails &#8211; you&#8217;re looking to match a literal <code>&quot;<\/code>, but it&#8217;s not there for your &quot;<code>null<\/code>&quot; value<\/p>\n<p>This <a href=\"https:\/\/regex101.com\/r\/tQcyKw\/1\" rel=\"nofollow noreferrer\">regular expression<\/a> is both simpler to read, and pulls what you&#8217;re looking for (without the extraneous comma):<\/p>\n<pre><code>| rex field=Message &quot;TimesAccessed[[:punct:]]+(?&lt;TimesAccessed&gt;[^\\&quot;,]+)&quot;\n<\/code><\/pre>\n<p>Use the <code>[[:punct:]]<\/code> character class to match any punctuation between the text you&#8217;re trying to match<\/p>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/73122992\/splunk-rex-search-unable-to-tabulate-because-of-null\/73126979#73126979<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Checking your regex on regex101 shows that it fails &#8211; you&#8217;re looking to match a literal &quot;, but it&#8217;s not there for your &quot;null&quot; value This regular expression is both simpler to read, and pulls what you&#8217;re looking for (without the extraneous comma): | rex field=Message &quot;TimesAccessed[[:punct:]]+(?&lt;TimesAccessed&gt;[^\\&quot;,]+)&quot; Use the [[:punct:]] character class to match any &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=61000\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Answer by warren for Splunk rex Search &#8211; Unable to tabulate because of NULL<\/span><\/a><\/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-61000","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\/61000","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=61000"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/61000\/revisions"}],"predecessor-version":[{"id":61001,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/61000\/revisions\/61001"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61000"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=61000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}