<?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 to combine multiple rex expressions and rename the field for an eval expression? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126045#M34126</link>
    <description>&lt;P&gt;Assuming that the OP has given sample data THAT DOES NOT MATCH his real data and that there is "something" before the text that HE SAID was sample data, this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | rex ".*?Address Line 1=(?&amp;lt;address1&amp;gt;[^\,]*)[^=]*=(?&amp;lt;address2&amp;gt;[^,]*)[^=]*=(?&amp;lt;address3&amp;gt;[^\,]*)[^=]*=(?&amp;lt;address4&amp;gt;[^\,]*)[^=]*=(?&amp;lt;Postcode&amp;gt;[\w]*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Jul 2015 17:05:57 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-07-17T17:05:57Z</dc:date>
    <item>
      <title>How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126018#M34099</link>
      <description>&lt;P&gt;Hi, I wonder if someone could help me please.&lt;/P&gt;

&lt;P&gt;I'm currently using the following to extract certain fields contained with the events raw data.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "Address Line 1=(?&amp;lt;address1&amp;gt;[^,]*)"  | rex "Address Line 2=(?&amp;lt;address2&amp;gt;[^,]*)"  | rex "Address Line 3=(?&amp;lt;address3&amp;gt;[^,]*)"  | rex "Address Line 4=(?&amp;lt;address4&amp;gt;[^,]*)"  | rex "Postcode=(?&amp;lt;postcode&amp;gt;[^,]*)"  |
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But to cut down on the number of searches, I'm trying to join the rex expressions together, so using the inbuilt field extractor I've come up with the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "^(?:[^=\n]*=){6}(?P&amp;lt;Address_Line_1&amp;gt;[^=]+)[^ \n]* (?P&amp;lt;Address_Line_2&amp;gt;[^=]+)=,\s+(?P&amp;lt;Address_Line_3&amp;gt;\w+\s+\w+\s+\d+)=,\s+(?P&amp;lt;Address_Line_4&amp;gt;[^=]+)=,\s+\w+\s+(?P&amp;lt;Postcode&amp;gt;[^=]+)" |
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I'm having a little difficulty in replicating this part of the original rex expressions&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (?&amp;lt;address1&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where I'm renaming the field with the aim of then using an eval expression to create a combined Address field.&lt;/P&gt;

&lt;P&gt;Could someone perhaps have a look at this please and offer some guidance on how  may go about achieving this.&lt;BR /&gt;
Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 05:32:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126018#M34099</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-07-16T05:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126019#M34100</link>
      <description>&lt;P&gt;A sample of such an event would be helpful. Also, is there a reason you want to use &lt;CODE&gt;rex&lt;/CODE&gt; instead of automatic field extractions?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 06:49:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126019#M34100</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-07-16T06:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126020#M34101</link>
      <description>&lt;P&gt;Hi @jeffland, thank you for taking the time to reply to my post.&lt;/P&gt;

&lt;P&gt;Unfortunately I'm unable to provide you with event details because of their confidential nature, but the address lines are in the following format:&lt;/P&gt;

&lt;P&gt;Address Line 1=1The Street, Address Line 2=The Town, Address Line 3=, Address Line 4=The City, Postcode=AB12CD&lt;/P&gt;

&lt;P&gt;I'm not sure whether this helps.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 07:11:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126020#M34101</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-07-16T07:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126021#M34102</link>
      <description>&lt;P&gt;Try this -&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| rex "Address Line 1=(?[^,]*)\,\s*Address Line 2=(?[^,]*)\,\s*Address Line 3=(?[^,]*)\,\s*Address Line 4=(?[^,]*)\,\s*Postcode=(?[^,]*)"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 08:24:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126021#M34102</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2015-07-16T08:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126022#M34103</link>
      <description>&lt;P&gt;Your "sample" is just what I wanted, of course you don't have to post actual content - just the form of it. Have a look at this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[^\=]*\=(?&amp;lt;Address_Line_1&amp;gt;[^\,]*)[^\=]*\=(?&amp;lt;Address_Line_2&amp;gt;[^,]*)[^\=]*\=(?&amp;lt;Address_Line_3&amp;gt;[^\,]*)[^\=]*\=(?P&amp;lt;Address_Line_4&amp;gt;[^\,]*)[^\=]*\=(?&amp;lt;Postcode&amp;gt;[\w]*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I was curious to see a sample because the regex the field extractor built looked weird.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 09:00:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126022#M34103</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-07-16T09:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126023#M34104</link>
      <description>&lt;P&gt;Hi thank you for taking the time to reply to my post.&lt;/P&gt;

&lt;P&gt;I've tried the expression you kindly provided, and unfortunately I'm receiving the following error: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'rex' command: Encountered the following error while compiling the regex 'Address Line 1=(?[^,]*)\,\s*Address Line 2=(?[^,]*)\,\s*Address Line 3=(?[^,]*)\,\s*Address Line 4=(?[^,]*)\,\s*Postcode=(?[^,]*)': Regex: unrecognized character after (? or (?-
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In additon, and forgive me, but am I right in thinking that this won't for example find 'Address Line 1' and then change it to 'address1' as per my original query.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 11:04:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126023#M34104</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-07-16T11:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126024#M34105</link>
      <description>&lt;P&gt;Hi @jeffland, thank you for coming back to me with this.&lt;/P&gt;

&lt;P&gt;The expression works, but it doesn't change for example 'Address Line 1' to 'address1' as per my original post.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 11:07:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126024#M34105</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-07-16T11:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126025#M34106</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| rex "Address Line 1=(?&amp;lt;addressline1&amp;gt;[^,]*)\,\s*Address Line 2=(?&amp;lt;addressline2&amp;gt;[^,]*)\,\s*Address Line 3=(?&amp;lt;addressline3&amp;gt;[^,]*)\,\s*Address Line 4=(?&amp;lt;addressline4&amp;gt;[^,]*)\,\s*Postcode=(?postcode[^,]*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2015 11:58:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126025#M34106</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2015-07-16T11:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126026#M34107</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| rex "Address Line 1=(?&amp;lt;addressline1&amp;gt;[^,]*)\,\s*Address Line 2=(?&amp;lt;addressline2&amp;gt;[^,]*)\,\s*Address Line 3=(?&amp;lt;addressline3&amp;gt;[^,]*)\,\s*Address Line 4=(?&amp;lt;addressline4&amp;gt;[^,]*)\,\s*Postcode=(?postcode[^,]*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2015 12:17:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126026#M34107</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2015-07-16T12:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126027#M34108</link>
      <description>&lt;P&gt;Ok, then just rename the capturing group in question - i.e. rename&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[^\=]*\=(?&amp;lt;Address_Line_1&amp;gt;[^\,]*) ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[^\=]*\=(?&amp;lt;address1&amp;gt;[^\,]*) ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2015 13:09:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126027#M34108</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-07-16T13:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126028#M34109</link>
      <description>&lt;P&gt;Just swap out the names as you see fit like this:&lt;/P&gt;

&lt;P&gt;Before:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[^\=]*\=(?&amp;lt;Address_Line_1&amp;gt;[^\,]*)[^\=]*\=(?&amp;lt;Address_Line_2&amp;gt;[^,]*)[^\=]*\=(?&amp;lt;Address_Line_3&amp;gt;[^\,]*)[^\=]*\=(?P&amp;lt;Address_Line_4&amp;gt;[^\,]*)[^\=]*\=(?&amp;lt;Postcode&amp;gt;[\w]*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[^\=]*\=(?&amp;lt;address1&amp;gt;[^\,]*)[^\=]*\=(?&amp;lt;address2&amp;gt;[^,]*)[^\=]*\=(?&amp;lt;address3&amp;gt;[^\,]*)[^\=]*\=(?&amp;lt;address4&amp;gt;[^\,]*)[^\=]*\=(?&amp;lt;Postcode&amp;gt;[\w]*)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2015 13:14:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126028#M34109</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-16T13:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126029#M34110</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt;, thank you for coming back to me with this.&lt;/P&gt;

&lt;P&gt;Unfortunately this doesn't work.&lt;/P&gt;

&lt;P&gt;If you look at my original post, the expression was as follows:  &lt;CODE&gt;rex "Address Line 1=(?[^,]*)"&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;With this, the expression searches for 'Address_Line_1' which is how the field is formatted in the raw data and then the second part renames this to 'adddress1'.&lt;/P&gt;

&lt;P&gt;In the query you kindly provided, this only looks for 'Address_Line_1' it doesn't rename this.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126029#M34110</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2020-09-29T06:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126030#M34111</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/193600"&gt;@jeffland&lt;/a&gt;, thank you for coming back to me, but unfortuantely this doens't work, because the expression is not looking for 'Address_Line_1' before renaming it.&lt;/P&gt;

&lt;P&gt;If you look at my original expression: &lt;CODE&gt;rex "Address Line 1=(?[^,]*)"&lt;/CODE&gt; the first part looks for the 'Address_Line_1' field, then it renames this to 'address1' which I can then pick up lateron in my query to pull all the address details together.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:43:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126030#M34111</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2020-09-29T06:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126031#M34112</link>
      <description>&lt;P&gt;Chris, did you actually &lt;EM&gt;try&lt;/EM&gt; the &lt;CODE&gt;After&lt;/CODE&gt; command?  I believe you are misunderstanding the RegEx.  The string between the angle-brackets is the NAME of the captured group.   It seems that you are assuming that because the literal string "Address Line " is not present in my RegEx, that it cannot work, but this is incorrect.  I can match it based on the placement and ordering of the equals-signs also, which is what the RegEx is doing.  Just try it.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 13:35:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126031#M34112</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-16T13:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126032#M34113</link>
      <description>&lt;P&gt;Hi @woodcock, thnak you for this.&lt;/P&gt;

&lt;P&gt;Yes I did try the expression, but as I say, isn't extracting the data.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 13:50:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126032#M34113</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-07-16T13:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126033#M34114</link>
      <description>&lt;P&gt;That's not how &lt;CODE&gt;rex&lt;/CODE&gt; works. The command extracts something from an existing string and can place selected parts of that under any name in a field.&lt;/P&gt;

&lt;P&gt;I just tried to smarten up your initial regex by not using the rigid "Address Line 1=", but you could of course keep that rigid format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Address\sLine\s1\=(?&amp;lt;address1&amp;gt;[^\,]*)Address\sLine\2\=(?&amp;lt;address2&amp;gt;[^,]*)...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2015 14:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126033#M34114</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-07-16T14:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126034#M34115</link>
      <description>&lt;P&gt;How can that be?  I copied the "Before" RegEx directly from the answer by @jeffland under which you said this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;The expression works, but it doesn't change for example 'Address Line 1' to 'address1' as per my original post.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I modified the "working" solution to do that last part.   You have got to get your stories straight or provide sample data or nobody is going to be able to help you.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 14:04:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126034#M34115</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-16T14:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126035#M34116</link>
      <description>&lt;P&gt;Hi @dineshraj9&lt;/P&gt;

&lt;P&gt;Please don't post multiple answers on one question. If you're trying to add more content, just comment below your original answer. Also, it's helpful if you explain your searches to the user (and everyone else reading this post) rather than just copying and pasting it without context. I've converted your other 2 answers under your first one already, so something to keep in mind for the future. Thanks. &lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 18:48:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126035#M34116</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-07-16T18:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126036#M34117</link>
      <description>&lt;P&gt;@ppablo : I really don't understand why I keep getting messages that moderator would review the post and once they approve it will show up.&lt;BR /&gt;
Ya will ensure that I explain my answers. But please improve the portal to not crash when uploading answers and moderators to be quick in reviewing the answers and uploading it..&lt;BR /&gt;
Thanks!!!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2015 03:43:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126036#M34117</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2015-07-17T03:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rex expressions and rename the field for an eval expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126037#M34118</link>
      <description>&lt;P&gt;Hi @ woodcock, thank you for coming back to me with this.&lt;/P&gt;

&lt;P&gt;Firstly my apologies if you feel my stories aren't straight, personally I don' t feel this the case, as this has changed since my initial post. I did also provide sample data to @jefferson who found it more than adequate, see below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Address Line 1=1The Street, Address Line 2=The Town, Address Line 3=, Address Line 4=The City, Postcode=AB12CD
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am very new to Splunk so I appreciate that rex not be the correct command to work, but it seems to have worked fine so far.&lt;/P&gt;

&lt;P&gt;I'll try to explain in simpler terms what I'm trying to acheive and hopefully this helps.&lt;/P&gt;

&lt;P&gt;My original expression was &lt;CODE&gt;| rex "Address Line 1=(?[^,]*)"..........&lt;/CODE&gt;. The first part of the expression searches my 'Raw Data' for the field 'Address Line 1". It then assigns the variable 'address1' to this. This variable is used later on in my full search.&lt;/P&gt;

&lt;P&gt;As mentioned in my original post, rather than having multiple searcheds i.e '| rex "Address....' I wanted to bring all the elements of the address into one rex expression.&lt;/P&gt;

&lt;P&gt;Forgive me but from the testing I've done the expressions you kindly provided, certainly from my testing don't search for the 'Address Line 1' field to assign the variable 'address1' to it.&lt;/P&gt;

&lt;P&gt;I hope this helps.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2015 06:20:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rex-expressions-and-rename-the-field-for/m-p/126037#M34118</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-07-17T06:20:20Z</dc:date>
    </item>
  </channel>
</rss>

