The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 09-27-2006
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
* in regular expression will match any number (or none) of the single character that immediately precedes it

Code:
sed 's/From here*to here/new text/g'
This regular expression From here*to here will match
From herto here
From hereto here
From hereeto here
...

\ Usually, turn off the special meaning of the following character

Code:
sed 's/From here\*to here/new text/g'
This regular expression From here\*to here will match
From here*to here

try this

Code:
sed 's/From here.*to here/new text/g'