title: LINQ query result with string manipulation and regex
body: <h1>Context</h1>
  
  <p>I retrieve a list of sites from a database like this:</p>
  
  <pre><code>DashboardEntities dashboardDB = new DashboardEntities();
  
  var sites = dashboardDB.Instances
      .Select(attr =&gt; new SiteModel
          {
              server = attr.server,
              pool = attr.pool,
              url = attr.url,
              version = attr.version,
              client = ???
          })
      .ToList();
  
  return sites;
  </code></pre>
  
  <p>For <code>client</code>, I need to get a substring from the url like this:</p>
  
  <pre><code>String client = "";
  
  Regex rgx = new Regex(@"\.[a-z-./]+");
  client = rgx.Replace(attr.url, "");
  
  rgx = new Regex("formation-");
  client = rgx.Replace(client, "");
  </code></pre>
  
  <h1>Question</h1>
  
  <p>How do this string manipulation with regex into my LINQ query?</p>