<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Harshvardhan</title>
    <description>The latest articles on DEV Community by Harshvardhan (@hypersudo).</description>
    <link>https://dev.to/hypersudo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1148443%2Fafdbbbdc-6c62-486d-b595-2ac8713f0f2e.jpg</url>
      <title>DEV Community: Harshvardhan</title>
      <link>https://dev.to/hypersudo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hypersudo"/>
    <language>en</language>
    <item>
      <title>Regular expression to validate domains ending in .mygoogle.com and .google.com:</title>
      <dc:creator>Harshvardhan</dc:creator>
      <pubDate>Mon, 28 Aug 2023 18:04:31 +0000</pubDate>
      <link>https://dev.to/hypersudo/regular-expression-to-validate-domains-ending-in-mygooglecom-and-googlecom-3199</link>
      <guid>https://dev.to/hypersudo/regular-expression-to-validate-domains-ending-in-mygooglecom-and-googlecom-3199</guid>
      <description>&lt;p&gt;`function isValidDomain(domain) {&lt;br&gt;
  const validDomainsRegex = /^(?:\w+.)?(mygoogle.com|google.com)$/;&lt;br&gt;
  return validDomainsRegex.test(domain);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;// Test the function&lt;br&gt;
const domain1 = '&lt;a href="https://www.mygoogle.com"&gt;https://www.mygoogle.com&lt;/a&gt;';&lt;br&gt;
const domain2 = '&lt;a href="https://www.google.com"&gt;https://www.google.com&lt;/a&gt;';&lt;br&gt;
const domain3 = '&lt;a href="https://www.twitter.com"&gt;https://www.twitter.com&lt;/a&gt;';&lt;/p&gt;

&lt;p&gt;console.log(isValidDomain(domain1)); // true&lt;br&gt;
console.log(isValidDomain(domain2)); // true&lt;br&gt;
console.log(isValidDomain(domain3)); // false`&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
