<?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 Regex not working in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535163#M36495</link>
    <description>&lt;P&gt;Trying to Pick domainType and domainName from below log using the below regex:&lt;/P&gt;&lt;P&gt;It works in regex101 but not in Splunk, it gives a blank column.&lt;BR /&gt;&lt;BR /&gt;domainName - rex"(?:domainName\\\"\:\\\")(?&amp;lt;domainName&amp;gt;([a-zA-Z0-9-\.]+))"&amp;nbsp;&lt;BR /&gt;domainType -&amp;nbsp;rex"(?:domainType\\\"\:\\\")(?&amp;lt;domainType&amp;gt;\w)"&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;"payload":"{\"domainType\":\"L\",\"modifiedBy\":\"\",\"relayHost\":\"\",\"rewriteDomain\":\"\",\"wildcardAccount\":\"\",\"domainName\":\"xxx.yyyyy.com\"}"},"encoding":null,"contentType":"application/json","responseCode":null} &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jan 2021 09:16:55 GMT</pubDate>
    <dc:creator>Deprasad</dc:creator>
    <dc:date>2021-01-08T09:16:55Z</dc:date>
    <item>
      <title>Regex not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535163#M36495</link>
      <description>&lt;P&gt;Trying to Pick domainType and domainName from below log using the below regex:&lt;/P&gt;&lt;P&gt;It works in regex101 but not in Splunk, it gives a blank column.&lt;BR /&gt;&lt;BR /&gt;domainName - rex"(?:domainName\\\"\:\\\")(?&amp;lt;domainName&amp;gt;([a-zA-Z0-9-\.]+))"&amp;nbsp;&lt;BR /&gt;domainType -&amp;nbsp;rex"(?:domainType\\\"\:\\\")(?&amp;lt;domainType&amp;gt;\w)"&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;"payload":"{\"domainType\":\"L\",\"modifiedBy\":\"\",\"relayHost\":\"\",\"rewriteDomain\":\"\",\"wildcardAccount\":\"\",\"domainName\":\"xxx.yyyyy.com\"}"},"encoding":null,"contentType":"application/json","responseCode":null} &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 09:16:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535163#M36495</guid>
      <dc:creator>Deprasad</dc:creator>
      <dc:date>2021-01-08T09:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535167#M36496</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/38204"&gt;@Deprasad&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "domainType\":\"(?&amp;lt;domainType&amp;gt;[^\"]*).*domainName\":\"(?&amp;lt;domainName&amp;gt;[^\"]*)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/4QfKNj/1" target="_blank"&gt;https://regex101.com/r/4QfKNj/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 09:42:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535167#M36496</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-08T09:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535169#M36497</link>
      <description>&lt;P&gt;Rex in splunk requires more escaping for backslashes than regex101&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="\"payload\":\"{\\\"domainType\\\":\\\"L\\\",\\\"modifiedBy\\\":\\\"\\\",\\\"relayHost\\\":\\\"\\\",\\\"rewriteDomain\\\":\\\"\\\",\\\"wildcardAccount\\\":\\\"\\\",\\\"domainName\\\":\\\"xxx.yyyyy.com\\\"}\"},\"encoding\":null,\"contentType\":\"application/json\",\"responseCode\":null} "
| rex "(?:domainName\\\\\"\:\\\\\")(?&amp;lt;domainName&amp;gt;([a-zA-Z0-9-\.]+))"
| rex "(?:domainType\\\\\"\:\\\\\")(?&amp;lt;domainType&amp;gt;\w)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 09:46:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535169#M36497</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-01-08T09:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535170#M36498</link>
      <description>&lt;P&gt;Below may help you..&lt;/P&gt;&lt;P&gt;|makeresults | eval _raw="\"payload\":\"{\\\"domainType\\\":\\\"L\\\",\\\"modifiedBy\\\":\\\"\\\",\\\"relayHost\\\":\\\"\\\",\\\"rewriteDomain\\\":\\\"\\\",\\\"wildcardAccount\\\":\\\"\\\",\\\"domainName\\\":\\\"xxx.yyyyy.com\\\"}\"},\"encoding\":null,\"contentType\":\"application/json\",\"responseCode\":null}\"" | rex field=_raw "domainType\\\\\":\\\\\"(?&amp;lt;domainType&amp;gt;[^\\\\\"]+).+domainName\\\\\":\\\\\"(?&amp;lt;domainname&amp;gt;[^\\\\\"]+)"&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;An upvote would be appreciated if the above reply is useful to you.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 09:47:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535170#M36498</guid>
      <dc:creator>saravanan90</dc:creator>
      <dc:date>2021-01-08T09:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535177#M36499</link>
      <description>&lt;P&gt;Thanks!! that's worked. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 11:16:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535177#M36499</guid>
      <dc:creator>Deprasad</dc:creator>
      <dc:date>2021-01-08T11:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535178#M36500</link>
      <description>&lt;P&gt;Thanks!! The payload you used in the regex101 is not same as the provided.&lt;BR /&gt;Though it worked in Regex101, still faced the same issue with Splunk. Tried the solution suggested by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;and it worked.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 11:20:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Regex-not-working/m-p/535178#M36500</guid>
      <dc:creator>Deprasad</dc:creator>
      <dc:date>2021-01-08T11:20:21Z</dc:date>
    </item>
  </channel>
</rss>

