<?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: Regular Expression extract seven digit number with no special characters or white space before/after. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587662#M204657</link>
    <description>&lt;LI-CODE lang="markup"&gt;(incident\s|investigation\s|ID\s\#)(?&amp;lt;ID&amp;gt;[1-9]\d\d\d\d\d\d)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 04 Mar 2022 14:25:51 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-03-04T14:25:51Z</dc:date>
    <item>
      <title>How to extract seven digit number with no special characters or white space before/after?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587651#M204651</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am attempting to extract from a field a seven digit number which can sometimes have a space or special character such as # in front of it. I want to be able to output it such that the new field only returns the seven digit number, no special characters or white space before and after. Also, I want to set it such that it will exclude where the seven digit number begins with zero. So far, I have only been able to come up with and tried the following in regular expression:&lt;/P&gt;
&lt;P&gt;(?&amp;lt;Field1&amp;gt;\d\d\d\d\d\d\d) *Pulls less than seven digits as well; need exactly seven.&lt;/P&gt;
&lt;P&gt;(?&amp;lt;Field1&amp;gt;[^a-zA-Z]\d{7}) *Does not omit special characters before it and pulls seven digit numbers of 0000000 (want to exclude these).&lt;/P&gt;
&lt;P&gt;Can I get some assistance on what the correct regular expression is to be able to pull a seven digit number with no special characters or space before/after and not all zeroes? Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 02:16:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587651#M204651</guid>
      <dc:creator>rhenry</dc:creator>
      <dc:date>2022-03-08T02:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression extract seven digit number with no special characters or white space before/after.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587652#M204652</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243576"&gt;@rhenry&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;could you share some sample of your logs, highlighting the part of logs to take.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 13:44:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587652#M204652</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-04T13:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression extract seven digit number with no special characters or white space before/after.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587653#M204653</link>
      <description>&lt;P&gt;Does this work for you?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;Field1&amp;gt;[1-9]\d{6})&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Mar 2022 13:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587653#M204653</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-04T13:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression extract seven digit number with no special characters or white space before/after.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587656#M204654</link>
      <description>&lt;P&gt;I can give an example:&lt;/P&gt;&lt;P&gt;“The analysis of the log shows for website &lt;A href="http://www.somewebsite.com/url-id/1234567abc124def343" target="_blank"&gt;http://www.somewebsite.com/url-id/1234567abc124def343&lt;/A&gt; there was a malicious attack, ID #1234567.”&lt;/P&gt;&lt;P&gt;In the example above, I only want to pull the second number with ID in front of it. I do not want to pull the seven digit number in the url above. Does that make sense?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 13:55:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587656#M204654</guid>
      <dc:creator>rhenry</dc:creator>
      <dc:date>2022-03-04T13:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression extract seven digit number with no special characters or white space before/after.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587657#M204655</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243576"&gt;@rhenry&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you always have "#" before the number, you could use something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\#(?&amp;lt;ID&amp;gt;\d{7})"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/aQEFp4/1" target="_blank"&gt;https://regex101.com/r/aQEFp4/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if there could be other conditions, please share some example.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:03:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587657#M204655</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-04T14:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression extract seven digit number with no special characters or white space before/after.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587661#M204656</link>
      <description>&lt;P&gt;This is helpful.&lt;/P&gt;&lt;P&gt;So, drilling down on the first example, I want to be be able to specifically locate where it begins with "ID" and then capture that seven digit number afterward. I might have some cases where a different word would appear before it (i.e. "Investigation" or "Incident"). Is it possible to write a regular expression where it will look for multiple words and capture the seven digit number following it? Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587661#M204656</guid>
      <dc:creator>rhenry</dc:creator>
      <dc:date>2022-03-04T14:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression extract seven digit number with no special characters or white space before/after.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587662#M204657</link>
      <description>&lt;LI-CODE lang="markup"&gt;(incident\s|investigation\s|ID\s\#)(?&amp;lt;ID&amp;gt;[1-9]\d\d\d\d\d\d)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:25:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587662#M204657</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-04T14:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression extract seven digit number with no special characters or white space before/after.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587663#M204658</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243576"&gt;@rhenry&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes it's possible, but to help you I need some examples of the various logs that's possible to parse.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:38:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587663#M204658</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-04T14:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression extract seven digit number with no special characters or white space before/after.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587697#M204664</link>
      <description>&lt;P&gt;I think I have found the solution to my problem. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 18:33:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587697#M204664</guid>
      <dc:creator>rhenry</dc:creator>
      <dc:date>2022-03-04T18:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression extract seven digit number with no special characters or white space before/after.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587729#M204678</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243576"&gt;@rhenry&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contyributors&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 06:24:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-seven-digit-number-with-no-special-characters-or/m-p/587729#M204678</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-05T06:24:25Z</dc:date>
    </item>
  </channel>
</rss>

