<?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: Rex, Regex and Field Extraction Question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34515#M7462</link>
    <description>&lt;P&gt;@MHS, note that you also need a backslash before the d to make it match a digit.  You also may need to escape (backslash) the single quotes, but I don't have data handy to test that.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Apr 2012 18:19:35 GMT</pubDate>
    <dc:creator>cphair</dc:creator>
    <dc:date>2012-04-24T18:19:35Z</dc:date>
    <item>
      <title>Rex, Regex and Field Extraction Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34513#M7460</link>
      <description>&lt;P&gt;I know this is going to be something simple and probably the fact that I'm posting this will trigger something in my dome.  But here goes:&lt;BR /&gt;
Here is what my data looks like:&lt;BR /&gt;
Apr 20 15:36:43 10.200.1.22 1794246290:      Called Party Number i = 0x80, '12858'&lt;BR /&gt;
Apr 20 15:36:42 10.200.1.22 1794246273:      Called Party Number i = 0xA1, '314255####'&lt;BR /&gt;
Note: #### is to redact for privacy&lt;/P&gt;

&lt;P&gt;So I want to do a search line extract for anything between the ' '.  My regex should look like this: '\d{5,10}'&lt;BR /&gt;
when I put this line into spunk to extract that field I just get a blank for the field dialed number:&lt;BR /&gt;
"Called Party Number i" | rex "'\d{5,10}'(?&lt;DIALEDNUMBER&gt;)"&lt;/DIALEDNUMBER&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://s3.amazonaws.com/1605tr62236/regexhelp.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 17:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34513#M7460</guid>
      <dc:creator>MHS</dc:creator>
      <dc:date>2012-04-24T17:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rex, Regex and Field Extraction Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34514#M7461</link>
      <description>&lt;P&gt;When using named field extractions, the field name goes inside (and before) before the matching group, like:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt; rex "'(?&amp;lt;dialednumber&amp;gt;\d{5,10})'"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 18:00:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34514#M7461</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-04-24T18:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Rex, Regex and Field Extraction Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34515#M7462</link>
      <description>&lt;P&gt;@MHS, note that you also need a backslash before the d to make it match a digit.  You also may need to escape (backslash) the single quotes, but I don't have data handy to test that.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 18:19:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34515#M7462</guid>
      <dc:creator>cphair</dc:creator>
      <dc:date>2012-04-24T18:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rex, Regex and Field Extraction Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34516#M7463</link>
      <description>&lt;P&gt;Yeah, I forgot about double escaping my \'s.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 18:45:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34516#M7463</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-04-24T18:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Rex, Regex and Field Extraction Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34517#M7464</link>
      <description>&lt;P&gt;Thanks for the response.  That took care of it.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 20:11:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-Regex-and-Field-Extraction-Question/m-p/34517#M7464</guid>
      <dc:creator>MHS</dc:creator>
      <dc:date>2012-04-24T20:11:14Z</dc:date>
    </item>
  </channel>
</rss>

