title: Troubles with regular expressions
body: <p>I wanted some help on extended regular expressions.
  I have been trying to figure out but in vain</p>
  
  <p>I have a file conflicts.txt which looks like this please note that it is only a part of this file , there are many lines like these</p>
  
  <pre><code>Server/core/wildSetting.json
      Server/core
    Client/arcade/src/assets
  Client/arcade/src/assets/
    Client/arcade/src/assets
  Client/arcade/src/Game/
  </code></pre>
  
  <p>i am writing a shell script which goes thorugh this file line  by line :</p>
  
  <pre><code> if [ -s "$CONFLICTS" ] ; then
     count=0 
     while read LINE
     do
     let count++
     echo -e "\n $LINE \n" 
     done &lt; $CONFLICTS
   fi
  </code></pre>
  
  <p>the above prints the file line by line what i am trying now is to redirect the lines which have a certain text into some other file for that i have modified echo line of the code to :</p>
  
  <pre><code>echo -e "\n $LINE \n" | grep -E "Server/game" &gt; newfile.txt
  </code></pre>
  
  <p>My Query :</p>
  
  <p>As we can see there are many lines of the form Server/Core...
  I want to write a regular expression and use it in grep, which matches two kind of lines</p>
  
  <p>1) line s containing the ONLY the string "Server/core"  preceeded and suceeded by any number of spaces </p>
  
  <p>2) all the  lines containing the string "assets" </p>
  
  <p>I have written a regular expression for the same but it doesn't work </p>
  
  <p>here my regEx:</p>
  
  <pre><code>grep -E   '[^' '*Server/core$] | [assets]' 
  </code></pre>
  
  <p>can you please tell me what is the right way of doing it ? </p>
  
  <p>Please note that there can be any number of spaces before and after "Server/core" as this file is a result of parsing a previous file.</p>
  
  <p>Thanks !</p>