title: how to detect a part of expression in a string in matlab
body: <p>I type as a user name <code>v = ddd</code> for example. I have then a string, name, of this shape: </p>
  
  <pre><code>aaa.bbb.ccc.ddd.eee 
  </code></pre>
  
  <p>and I want to detect if in my string name there exist (between dots) such string like from my input. How can I do it?</p>
  
  <p>I tried the idea with </p>
  
  <pre><code>str = 'REGEXP.helps.you.relax';
  user = 'el'
  [m s e] = regexp(str, '\w*user\w*', 'match', 'start', 'end')
  </code></pre>
  
  <p>but I get error, because cannot put the variable <code>'user'</code> this way inside regexp. 
  How can I do it correctly? Or maybe is there any simpler idea?</p>
  
  <p>Thanks!!</p>