title: $regex in mongodb pipeline
body: <p>I want to be able to use $regex to be able to find any words that contain certain keyword given by user, but it is not working. I have this:</p>
  <pre><code>aggregatePipeline.push({
        $match: {
          name: {
            $regex: `/${name.toLowerCase()}/`,
          },
        },
      });
  </code></pre>
  <p>I tried using $regexMatch, but it says it is not supported for free tier. Is there a work around?</p>
  <pre><code>{
        $regexMatch: {
          input: &quot;$name&quot;,
          regex: `/${name}/`,
        },
  }
  </code></pre>
  <p>I'm trying to avoid $regexMatch at least for now due to free tier.</p>
  <p>I am able to retrieve user by the exact name, but I also want to retreive all names that have a substring ex. 'ger', should retrieve 'Gerry', 'Gerald', 'anger'....</p>
  <pre><code>aggregatePipeline.push({ $match: { name: name.toLowercase() } });
  </code></pre>
  <p>Thanks a lot!</p>