title: using a variable in regex cpp
body: <p>I have a string: </p>
  
  <pre><code>string str1= "hello"; 
  string str2="hel"; 
  </code></pre>
  
  <p>And I am doing this to see if str1 has str2 in it: </p>
  
  <pre><code>regex e = str2+"*"
   bool x=regex_match(str1,e); 
  cout&lt;&lt;x; 
  </code></pre>
  
  <p>I am getting this : error: conversion from 'std::__cxx11::basic_string' to non-scalar type 'std::__cxx11::regex {aka std::__cxx11::basic_regex}' requested regex e = str2+"";</p>
  
  <p>How to use the variable in my regex. Can someone please tell me where am I going wrong? TIA. </p>