<?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: Using sed with wildcards in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612912#M104444</link>
    <description>Hi (again) Jeff:&lt;BR /&gt;&lt;BR /&gt;Try this.  It limits replacements to lines beginning with "TXT=" and replaces the first quoted string found.  Thus, in you example. "THISISIT" or "WHATEVER" would be replaced with "new_string":&lt;BR /&gt;&lt;BR /&gt;I choose perl to exploit its exceedingly powerful regular expression engine.&lt;BR /&gt;&lt;BR /&gt;# perl -pe 's!(^TXT=.*?")(.*?")!\1new_string"!' your_file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Fri, 26 Aug 2005 19:16:10 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2005-08-26T19:16:10Z</dc:date>
    <item>
      <title>Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612894#M104426</link>
      <description>&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I've a need to substitute some string in a line where I do not what the string is currently, only what I need it to be. I've been trying, with no luck to use sed so I'm turning to the group. A sample line follows:&lt;BR /&gt;&lt;BR /&gt;TXT=getsearch ("THISISIT", "This is always the same: ",3);&lt;BR /&gt;&lt;BR /&gt;Now I have a need to replace THISISIT which I will not know with something else that I do know. The TXT= is unique so I could key off that to get the target line I want to modify. I've tried a number of things, but I'm either not qualifying any lines or I get something like TXT=getsearch ("THISISIT"TXT=getsearch ("THISISIT", "This is always the same: ",3);&lt;BR /&gt;&lt;BR /&gt;Hope I've described it well enough.</description>
      <pubDate>Fri, 26 Aug 2005 10:37:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612894#M104426</guid>
      <dc:creator>Jeff Gyurko</dc:creator>
      <dc:date>2005-08-26T10:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612895#M104427</link>
      <description>How about:&lt;BR /&gt;&lt;BR /&gt;sed 's/"[^"]*"/"replacement string"/' filename</description>
      <pubDate>Fri, 26 Aug 2005 11:05:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612895#M104427</guid>
      <dc:creator>Pat Lieberg</dc:creator>
      <dc:date>2005-08-26T11:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612896#M104428</link>
      <description>how about trying something in awk&lt;BR /&gt;&lt;BR /&gt;awk -F"\"" '&lt;BR /&gt;/TXT=/ {printf("%s\"%s",$1,"yourtext");&lt;BR /&gt;for ( i=3;i&lt;NF&gt;&lt;/NF&gt;print $NF;&lt;BR /&gt;}'&lt;BR /&gt;&lt;BR /&gt;sed could be something like this&lt;BR /&gt;&lt;BR /&gt;sed -e 's/^\(TXT=getsearch ("\)[:alnum:]*\(", "This is always.*$\)/\1yourtext\2/</description>
      <pubDate>Fri, 26 Aug 2005 11:07:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612896#M104428</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2005-08-26T11:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612897#M104429</link>
      <description>Pat, &lt;BR /&gt;&lt;BR /&gt;It worked to a point. It changed any occurance of that to THISISIT. Since there are other instances of it in the file they were all changed to THISISIT.&lt;BR /&gt;&lt;BR /&gt;What I did do, taking your suggestion is add the qualifier PW1 to the sed like:&lt;BR /&gt;&lt;BR /&gt;sed '/PW1=/s/"[^"]*"/"replacement string"/' filename.&lt;BR /&gt;&lt;BR /&gt;It changed the one line with PW1.&lt;BR /&gt;&lt;BR /&gt;Thanks a bunch.</description>
      <pubDate>Fri, 26 Aug 2005 11:25:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612897#M104429</guid>
      <dc:creator>Jeff Gyurko</dc:creator>
      <dc:date>2005-08-26T11:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612898#M104430</link>
      <description>&lt;BR /&gt;Sorry Pat, the correct line was&lt;BR /&gt;&lt;BR /&gt;sed '/TXT=/s/"[^"]*"/"replacement string"/' filename.&lt;BR /&gt;&lt;BR /&gt;Not PW1. PW1 was still in my cut/paste buffer.</description>
      <pubDate>Fri, 26 Aug 2005 11:32:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612898#M104430</guid>
      <dc:creator>Jeff Gyurko</dc:creator>
      <dc:date>2005-08-26T11:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612899#M104431</link>
      <description>Jeff,&lt;BR /&gt;&lt;BR /&gt;I've handled this same problem in the past by generating a sed command file on each occurence of the new "unknown" with a replacement command for sed.  &lt;BR /&gt;I generate that file into /var/tmp/sed.$$ &lt;BR /&gt;and then run my sed against that new command file with the "-f" option for sed.&lt;BR /&gt;&lt;BR /&gt;Probably a little clunky, but it has allowed me to get the job done everytime, as it is easy to build rather complex multiple sed command sets into a file and use it a base to change many files using the one command file.</description>
      <pubDate>Fri, 26 Aug 2005 11:36:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612899#M104431</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2005-08-26T11:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612900#M104432</link>
      <description>oops, good catch.  I overlooked that compeltely.&lt;BR /&gt;&lt;BR /&gt;Glad I at least got you on the right track.</description>
      <pubDate>Fri, 26 Aug 2005 11:53:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612900#M104432</guid>
      <dc:creator>Pat Lieberg</dc:creator>
      <dc:date>2005-08-26T11:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612901#M104433</link>
      <description>HI Jeff:&lt;BR /&gt;&lt;BR /&gt;How about:&lt;BR /&gt;&lt;BR /&gt;perl -ne 's!(.+),(.+),(.+)!"newstring",$2,$3!;print' yourfile&lt;BR /&gt;&lt;BR /&gt;...where "newstring" is the replacement for the THISISIT.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 26 Aug 2005 11:53:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612901#M104433</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-08-26T11:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612902#M104434</link>
      <description>&lt;BR /&gt;perl -pe 's/"$1"/"new text"/ if /^TXT.*\("(\w+)"/' old &amp;gt; new&lt;BR /&gt;&lt;BR /&gt;$1 gets the (\w+) on a match.&lt;BR /&gt;&lt;BR /&gt;The "" around $1 and new word in the substitute are belts and suspenders.... in case the the old text is 'TXT' or such.&lt;BR /&gt;&lt;BR /&gt;The $1 can be remembered eg: $thisisit=$1&lt;BR /&gt;and used for further substitutes in different context in the file.&lt;BR /&gt;&lt;BR /&gt;perl -pe '$thisisit = $1 if /^TXT.*\("(\w+)"/;&lt;BR /&gt;s/$thisisit/new text/ if defined ($thisisit)' old &amp;gt; new&lt;BR /&gt;&lt;BR /&gt;Check out the perl -i option for 'in place' edits.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Aug 2005 12:02:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612902#M104434</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-08-26T12:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612903#M104435</link>
      <description>&lt;BR /&gt;James,&lt;BR /&gt;&lt;BR /&gt;Thanks, but your solution changed every occurance and chopped off any text preceeding what I changed.&lt;BR /&gt;&lt;BR /&gt;ie: every changed line started with ^"THISISIT&lt;BR /&gt;&lt;BR /&gt;Trouble is, unlike sed, my breadth of knowledge in perl is not that much so I can make modifications to your suggestion.</description>
      <pubDate>Fri, 26 Aug 2005 13:30:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612903#M104435</guid>
      <dc:creator>Jeff Gyurko</dc:creator>
      <dc:date>2005-08-26T13:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612904#M104436</link>
      <description>Jeff,&lt;BR /&gt;&lt;BR /&gt;Try this with awk:&lt;BR /&gt;&lt;BR /&gt;# awk '{gsub("THISISIT","replacement_string"); print $0}' input_file&lt;BR /&gt;&lt;BR /&gt;regards!            &lt;BR /&gt;</description>
      <pubDate>Fri, 26 Aug 2005 14:43:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612904#M104436</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-08-26T14:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612905#M104437</link>
      <description>Hi Sandman,&lt;BR /&gt;&lt;BR /&gt;You're assuming I'll know what THISISIT will be, but I wont. From the looks of the awk, it will also change every occurance which I might not want.</description>
      <pubDate>Fri, 26 Aug 2005 14:51:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612905#M104437</guid>
      <dc:creator>Jeff Gyurko</dc:creator>
      <dc:date>2005-08-26T14:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612906#M104438</link>
      <description>Thanks for the clarification. So you don't know what the substitution string looks like. Are you going to input that from the keyboard e.g. with a read statement?&lt;BR /&gt;&lt;BR /&gt;Also if you don't want to change all occurances, then how many do you want to change? An example would certainly help.&lt;BR /&gt;&lt;BR /&gt;regards!</description>
      <pubDate>Fri, 26 Aug 2005 15:14:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612906#M104438</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-08-26T15:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612907#M104439</link>
      <description>&lt;BR /&gt;Hi Sandman,&lt;BR /&gt;&lt;BR /&gt;I'll know what I'm changing the string TO, but I don't know what the current string looks like to key off it. I can key off the beginning of the line where ^TXT is since that will be unique, but I'll only want it on the one matched line. The example is like the original question.&lt;BR /&gt;&lt;BR /&gt;ie: ^TXT=getsearch ("THISISIT", "This is always the same: ",3);&lt;BR /&gt;&lt;BR /&gt;I'll want to change THISISIT, but I won't know what THISISIT is. I'll only know THISISWHATIWANT. It 'should' only occur once which is why I can key off of ^TXT to get the line I want to operate on.</description>
      <pubDate>Fri, 26 Aug 2005 15:31:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612907#M104439</guid>
      <dc:creator>Jeff Gyurko</dc:creator>
      <dc:date>2005-08-26T15:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612908#M104440</link>
      <description>Jeff,&lt;BR /&gt;&lt;BR /&gt;first off, I am notg a perl expert&lt;BR /&gt;sencondly, this may require more than a single line of commands, so it may entail being an external function in script form you need to call on a single line where you need it.&lt;BR /&gt;&lt;BR /&gt;After saying that, if this might be of interest to you, read-on.&lt;BR /&gt;&lt;BR /&gt;Assuming the beginning of the string being constant, i.e., &lt;BR /&gt;&lt;BR /&gt;TXT=getsearch ("&lt;BR /&gt;&lt;BR /&gt;part never changes (this is what I understand from your original post), you can determine the position of first " sign, which is location-1 of your target string start point, using index function in perl something like&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;$MYSTRING=&lt;STDIN&gt;;&lt;BR /&gt;first_pos=index ($MYSTRING, '"');&lt;BR /&gt;$start4second=$first_pos+1;&lt;BR /&gt;second_pos=index ($MYSTING, '"', $start4second);&lt;BR /&gt;$length=$second_pos-$first_pos;&lt;BR /&gt;str2replace=substr($MYSTRING, $first_pos, $length);&lt;BR /&gt;print $str2replace;&lt;BR /&gt;&lt;BR /&gt;let's say you put this little code snippet in a file called extractor.pl and made it executable&lt;BR /&gt;&lt;BR /&gt;now, if the THISISIT going to be the same all thru one file, you can go with something like this&lt;BR /&gt;&lt;BR /&gt;SourceString=`head -1 myfile` #assuming one string per line in this myfile&lt;BR /&gt;&lt;BR /&gt;ReplString="Something I Know"&lt;BR /&gt;&lt;BR /&gt;hunt_string=`echo $SourceString | ./extractor.pl`&lt;BR /&gt;&lt;BR /&gt;cat myfile | sed -e "1,1s/$hunt_string/$repl_string/" &amp;gt; myoutfile&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;whereas, if the THISISIT different on each line, you can go with something like this&lt;BR /&gt;&lt;BR /&gt;ReplString="Something I Know"&lt;BR /&gt;&lt;BR /&gt;cat myfile | while read SourceString &lt;BR /&gt;&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;hunt_string=`echo $SourceString | ./extractor.pl`&lt;BR /&gt;&lt;BR /&gt;echo $SourceString | sed -e "1,1s/$hunt_string/$repl_string/" &amp;gt;&amp;gt; myoutfile&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DISCLAIMERS:&lt;BR /&gt;I need to emphasize I am !NOT! a perl expert hence no clue on interpretation of double and single quotes. As I used double quotes as delimiters for your hunt_string, I enclosed them in single quotes but it may not work. There are guru level people on PERL matters among us here and I am sure one can tell you the correct syntax if this does not do what you need.&lt;BR /&gt;&lt;BR /&gt;I know it is not the most elaborate solution but it might work. Take it as more of guideline than its syntax value.&lt;BR /&gt;&lt;BR /&gt;Good luck.&lt;BR /&gt;&lt;BR /&gt;&lt;/STDIN&gt;</description>
      <pubDate>Fri, 26 Aug 2005 15:48:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612908#M104440</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-08-26T15:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612909#M104441</link>
      <description>IF the string "TXT=getsearch " only occurrs in the file once, you should be able to do something like this little awk script:&lt;BR /&gt;&lt;BR /&gt;awk -F , '{ \&lt;BR /&gt;if (substr($1,1,13) == "TXT=getsearch") \&lt;BR /&gt;$1="TXT=getsearch (\"YOURNEWTEXTHERE\"" \&lt;BR /&gt;print $1","$2","$3 \&lt;BR /&gt;}' yourfile&lt;BR /&gt;&lt;BR /&gt;This is assuming that your example is accurate and there are only 3 fields if you use the comma as a delimiter.&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Aug 2005 15:49:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612909#M104441</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2005-08-26T15:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612910#M104442</link>
      <description>Jeff,&lt;BR /&gt;&lt;BR /&gt;Here's what I was able to do with sed based on your explanation of the problem at hand. This uses the hold buffers within sed to reproduce substitution patterns for later replay:&lt;BR /&gt;&lt;BR /&gt;# sed '/^TXT/s/\(get.* ("\)\(.*\)\(", "This is.*\)/\1replacement_string\3/' &lt;INPUTFILE&gt;&lt;BR /&gt;&lt;BR /&gt;hope it helps!!!&lt;/INPUTFILE&gt;</description>
      <pubDate>Fri, 26 Aug 2005 16:11:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612910#M104442</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-08-26T16:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612911#M104443</link>
      <description>Actually you can compact the sed command based on the fact that the target line is unique and it begins with "TXT=" i.e.&lt;BR /&gt;&lt;BR /&gt;# sed '/^TXT=/s/\(.* ("\)\(.*\)\(", .*\)/\1replacement\3/' &lt;YOUR_INPUT_FILE&gt;       &lt;BR /&gt;&lt;BR /&gt;regards!&lt;/YOUR_INPUT_FILE&gt;</description>
      <pubDate>Fri, 26 Aug 2005 16:31:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612911#M104443</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-08-26T16:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612912#M104444</link>
      <description>Hi (again) Jeff:&lt;BR /&gt;&lt;BR /&gt;Try this.  It limits replacements to lines beginning with "TXT=" and replaces the first quoted string found.  Thus, in you example. "THISISIT" or "WHATEVER" would be replaced with "new_string":&lt;BR /&gt;&lt;BR /&gt;I choose perl to exploit its exceedingly powerful regular expression engine.&lt;BR /&gt;&lt;BR /&gt;# perl -pe 's!(^TXT=.*?")(.*?")!\1new_string"!' your_file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 26 Aug 2005 19:16:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612912#M104444</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-08-26T19:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using sed with wildcards</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612913#M104445</link>
      <description>I like Pat's solution (with the final tweak of matching "^TXT") -- simple one-liner&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BTW,&lt;BR /&gt;I usually generalize a bit, allowing for variable whitespace.&lt;BR /&gt;So, I would have written the 'sed' script as:&lt;BR /&gt;&lt;BR /&gt;'/^[[:space:]]*TXT[[:space:]]*=/s/"[^"]*"/"replacement string"/'&lt;BR /&gt;&lt;BR /&gt;This would allow for any additional whitespace at start of line or around the "=".&lt;BR /&gt;&lt;BR /&gt;Note also, that it would have been not as elegant if we were trying to change the *second* quoted string and both strings were variable ;&amp;gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;my $.02&lt;BR /&gt;bv</description>
      <pubDate>Sat, 27 Aug 2005 14:08:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-sed-with-wildcards/m-p/3612913#M104445</guid>
      <dc:creator>Bob_Vance</dc:creator>
      <dc:date>2005-08-27T14:08:07Z</dc:date>
    </item>
  </channel>
</rss>

