<?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: Need help on rex command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Having-trouble-with-rex-command/m-p/590652#M205644</link>
    <description>&lt;P&gt;You should use a code block when post these. Is this just s string or a multiline event?&lt;BR /&gt;I any case this should be able to get it:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "[^\-\n]\s+\-\s+(?P&amp;lt;Error&amp;gt;.+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tested in regex101&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/xWQ0mj/1" target="_blank"&gt;https://regex101.com/r/xWQ0mj/1&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2022 12:03:57 GMT</pubDate>
    <dc:creator>diogofgm</dc:creator>
    <dc:date>2022-03-24T12:03:57Z</dc:date>
    <item>
      <title>Having trouble with rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-trouble-with-rex-command/m-p/590638#M205642</link>
      <description>&lt;P&gt;I have below raw string&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;03 Mar 2022 10:08:18,188 GMT ERROR [dbdiNotificationService,ServiceManagement] {} - Caught Runtime exception at service dbdiNotificationService java.lang.IllegalArgumentException: No enum constant com.db.fx4capi.Fx4cApiLocal.TradeProcessingStatus.TRADE_STATUS_CANCELLED at java.lang.Enum.valueOf(Enum.java:238) ~[?:1.8.0_311] at com.db.fx4capi.Fx4cApiLocal$TradeProcessingStatus.valueOf(Fx4cApiLocal.java:10) ~[trade-22.1.1-8.jar:?] at com.db.fx4cash.trade.step.GetTradeReferenceAndStatusStep.step(GetTradeReferenceAndStatusStep.java:24) ~[step-22.1.1-8.jar:?] at com.db.servicemanagement.TransactionDispatchService.executeIteration(TransactionDispatchService.java:275) [servicemanagement-22.1.1-8.jar:?] at com.db.servicemanagement.TransactionDispatchService.startDispatch(TransactionDispatchService.java:673) [servicemanagement-22.1.1-8.jar:?] at com.db.servicemanagement.TransactionDispatchService.run(TransactionDispatchService.java:91) [servicemanagement-22.1.1-8.jar:?] at com.db.servicemanagement.ServiceThread.run(ServiceThread.java:36) [servicemanagement-22.1.1-8.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_311]&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;I would like to capture marked in bold.&lt;/P&gt;
&lt;P&gt;am using below command but getting partial output.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=app_events_fx4cash_uk_prod source=*STPManager-servicemanagement.20220303-100818.log*
| rex field=_raw "^[^\-\n]*\-\s+(?P&amp;lt;Error&amp;gt;.+)"
| table Error&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;my output&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Caught Runtime exception at service dbdiNotificationService&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;but my requirement is i need to capture whole error marked in bold&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 15:23:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-trouble-with-rex-command/m-p/590638#M205642</guid>
      <dc:creator>bhaskar5428</dc:creator>
      <dc:date>2022-03-24T15:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-trouble-with-rex-command/m-p/590652#M205644</link>
      <description>&lt;P&gt;You should use a code block when post these. Is this just s string or a multiline event?&lt;BR /&gt;I any case this should be able to get it:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "[^\-\n]\s+\-\s+(?P&amp;lt;Error&amp;gt;.+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tested in regex101&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/xWQ0mj/1" target="_blank"&gt;https://regex101.com/r/xWQ0mj/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 12:03:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-trouble-with-rex-command/m-p/590652#M205644</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2022-03-24T12:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-trouble-with-rex-command/m-p/590654#M205646</link>
      <description>&lt;P&gt;Not working,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however below working for me&amp;nbsp;&lt;BR /&gt;rex field=_raw "^[^\-\n]*\-\s+(?P&amp;lt;Error&amp;gt;.$)"&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 12:12:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-trouble-with-rex-command/m-p/590654#M205646</guid>
      <dc:creator>bhaskar5428</dc:creator>
      <dc:date>2022-03-24T12:12:46Z</dc:date>
    </item>
  </channel>
</rss>

