title: search a character from string and store all data into a variable before that char
body: <p>I have a string variable which stores the values of an URL like </p>
  
  <pre><code>"http://abc/abc_UAT/CustomerDetail.aspx?r=1".
  </code></pre>
  
  <p>I just need to search the character <code>?</code> and need to store all character before '?' into another string variable</p>