title: How to extract a substring beginning and ending with user defined special characters from a string in linux?
body: <p>I am working on linux scripts and want to extract a substring out of a master string as in the following example :-</p>
  
  <p>Master string =</p>
  
  <pre><code>2011-12-03 11:04:22#Alex#Audrino^13b11254^Townville#USA#    
  </code></pre>
  
  <p>What I require is :-</p>
  
  <p>Substring = </p>
  
  <pre><code>13b11254    
  </code></pre>
  
  <p>I simply want to read and extract whatever is there in between ^   ^ special characters.</p>
  
  <p>This code will be used in a linux script.</p>