<?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: How do you write a regular expression to extract a field which has characters, numbers and also special characters? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384345#M112245</link>
    <description>&lt;P&gt;Hi @Deepz2612&lt;/P&gt;

&lt;P&gt;Try this, I included space and hyphen &lt;/P&gt;

&lt;P&gt;([A-Za-z0-9*,\s-])&lt;/P&gt;</description>
    <pubDate>Fri, 15 Feb 2019 09:13:57 GMT</pubDate>
    <dc:creator>vnravikumar</dc:creator>
    <dc:date>2019-02-15T09:13:57Z</dc:date>
    <item>
      <title>How do you write a regular expression to extract a field which has characters, numbers and also special characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384344#M112244</link>
      <description>&lt;P&gt;How do you write a regular expression to extract a field which has characters, numbers and also special characters? There are sometimes spaces in between.&lt;/P&gt;

&lt;P&gt;I tried this. rex "(?\w+[A-Z0-9][^-])" --- to include characters and hyphen,&lt;BR /&gt;
but it doesnt work&lt;/P&gt;

&lt;P&gt;Thanks in advance!!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 09:00:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384344#M112244</guid>
      <dc:creator>Deepz2612</dc:creator>
      <dc:date>2019-02-15T09:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a regular expression to extract a field which has characters, numbers and also special characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384345#M112245</link>
      <description>&lt;P&gt;Hi @Deepz2612&lt;/P&gt;

&lt;P&gt;Try this, I included space and hyphen &lt;/P&gt;

&lt;P&gt;([A-Za-z0-9*,\s-])&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 09:13:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384345#M112245</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-02-15T09:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a regular expression to extract a field which has characters, numbers and also special characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384346#M112246</link>
      <description>&lt;P&gt;It would help if you would post some sample data and requirements on what you need to extract.&lt;/P&gt;

&lt;P&gt;Regarding the regex you have: put it in on regex101.com and see the explanation of what it does, maybe that helps you spot the flaw.&lt;/P&gt;

&lt;P&gt;Also: when posting code like that, please put it in between backticks: ` or use the 101010 button in the message editor toolbar to post it as a code snippet, so special characters don't disappear.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 09:16:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384346#M112246</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-02-15T09:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a regular expression to extract a field which has characters, numbers and also special characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384347#M112247</link>
      <description>&lt;P&gt;Hi @Deepz2612 ,&lt;/P&gt;

&lt;P&gt;I tried this:-&lt;BR /&gt;
([\w\D]+) for extracting "tirx-Ten @140gmail.com"&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 09:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384347#M112247</guid>
      <dc:creator>MoniM</dc:creator>
      <dc:date>2019-02-15T09:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a regular expression to extract a field which has characters, numbers and also special characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384348#M112248</link>
      <description>&lt;P&gt;\w includes digits, \D is non-digits. So combining those two means you match basically anything.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 09:33:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384348#M112248</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-02-15T09:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a regular expression to extract a field which has characters, numbers and also special characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384349#M112249</link>
      <description>&lt;P&gt;hi @Deepz2612 ,&lt;/P&gt;

&lt;P&gt;you can try this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "(?P&amp;lt;field_name&amp;gt;[a-zA-Z0-9\s].*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Feb 2019 12:05:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384349#M112249</guid>
      <dc:creator>vinod94</dc:creator>
      <dc:date>2019-02-15T12:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a regular expression to extract a field which has characters, numbers and also special characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384350#M112250</link>
      <description>&lt;P&gt;this works for me :-&lt;/P&gt;

&lt;P&gt;[\w\D]*&lt;/P&gt;

&lt;P&gt;It would be better if you give the input data as well &lt;/P&gt;</description>
      <pubDate>Sun, 17 Feb 2019 13:44:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-regular-expression-to-extract-a-field-which/m-p/384350#M112250</guid>
      <dc:creator>kushagra9120</dc:creator>
      <dc:date>2019-02-17T13:44:10Z</dc:date>
    </item>
  </channel>
</rss>

