const regex = /<a[^<">]*?href="(?<url>[^<">]+?)"[^<>]*>(?<text>[^<">]*?about[^<">]*?)<\/a>/gi;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('<a[^<">]*?href="(?<url>[^<">]+?)"[^<>]*>(?<text>[^<">]*?about[^<">]*?)<\\\/a>', 'gi')
const str = `
<!DOCTYPE html><!-- Last Published: Mon May 20 2024 06:48:47 GMT+0000 (Coordinated Universal Time) --><html data-wf-domain="samliew.com" data-wf-page="65804b0de955ac0fb1b1b9d9" data-wf-site="5645ec632404c4fe414daa63" lang="en"><head><meta charset="utf-8"/><title>Samuel Liew (samliew) – Personal Website</title><meta content="Personal website of Samuel Liew, a web developer based in Australia." name="description"/><meta content="Samuel Liew (samliew) – Personal Website" property="og:title"/><meta content="Web Developer" property="og:description"/><meta content="https://assets-global.website-files.com/5645ec632404c4fe414daa63/5648e27201b1cc5d0cdb1ae9_bitstrips_profilepic2.png" property="og:image"/><meta content="Samuel Liew (samliew) – Personal Website" property="twitter:title"/><meta content="Web Developer" property="twitter:description"/><meta content="https://assets-global.website-files.com/5645ec632404c4fe414daa63/5648e27201b1cc5d0cdb1ae9_bitstrips_profilepic2.png" property="twitter:image"/><meta property="og:type" content="website"/><meta content="summary_large_image" name="twitter:card"/><meta content="width=device-width, initial-scale=1" name="viewport"/><link href="https://assets-global.website-files.com/5645ec632404c4fe414daa63/css/samliew.8ac5c4a65.min.css" rel="stylesheet" type="text/css"/><script type="text/javascript">!function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script><link href="https://assets-global.website-files.com/5645ec632404c4fe414daa63/5863435bca87298c05078eab_56474030e408ac6a4822ccb4_favicon.png" rel="shortcut icon" type="image/x-icon"/><link href="https://assets-global.website-files.com/5645ec632404c4fe414daa63/58634157ca3a1c533a1de622_56474030e408ac6a4822ccb4_favicon.png" rel="apple-touch-icon"/><link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin></head><body><header id="header" class="header"><a id="skip-to-content" href="#content" aria-description="Skip to main content" class="skip-to-content w-inline-block"><div>Skip to main content</div></a><div data-collapse="medium" data-animation="default" data-duration="400" data-doc-height="1" data-easing="ease" data-easing2="ease" role="banner" class="navbar w-nav"><div class="nav-container w-container"><a href="/" id="header-logo" aria-label="samliew - Web Developer" aria-description="Samuel Liew's website main logo" aria-current="page" class="brand w-nav-brand w--current"><div class="site-title">samliew</div><div class="site-tagline">Web Developer</div></a><nav role="navigation" class="menu w-nav-menu"><a href="/about-me" class="nav-link w-nav-link">About Me</a><a href="/services" class="nav-link w-nav-link">Services</a><a href="/portfolio" class="nav-link w-nav-link">Portfolio</a><a href="/projects" class="nav-link w-nav-link">Projects</a><a href="/contact" class="nav-link w-nav-link">Contact</a></nav><div class="menu-button w-nav-button"> <div class="menu-icon"><div class="menu-line menu-line-1"></div><div class="menu-line menu-line-2"></div><div class="menu-line menu-line-3"></div></div></div></div></div></header><main class="content-wrap"><div class="content w-container"><h2 class="home-header">Popular Pages</h2><div class="items-grid"><a href="/nric-generator" data-ix="block-link-effects" class="home-block-link w-inline-block"><div class="block-image-wrap"><img src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/572b01f7975b63a43dbbf2f9_nric.webp" height="215" width="290" alt="" class="block-image"/></div><h3 title="Singapore NRIC Number Generator" class="home-service-title">Singapore NRIC Generator</h3></a><a href="/projects" data-ix="block-link-effects" class="home-block-link w-inline-block"><div class="block-image-wrap"><img src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b4c4b71948541a072ccff3_small.svg" height="157" data-src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b124b6f990149f81cf8113_personal-projects-page.jpg" alt="" width="290" class="block-image"/></div><h3 class="home-service-title">Personal Projects</h3></a><a href="/wordscramble" data-ix="block-link-effects" class="home-block-link w-inline-block"><div class="block-image-wrap"><img src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b4c4b71948541a072ccff3_small.svg" height="209" data-src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b125045f00bad79ca03560_wordscramble-screenshot.jpg" alt="" width="290" class="block-image"/></div><h3 class="home-service-title">WordScramble Game</h3></a></div><h2 class="home-header">Browser Games</h2><div class="snippet-list"><a href="/wordscramble" id="w-node-_365d1235-a118-fc13-59ba-6ba52fda0aa9-2fda0aa8" class="snippet w-inline-block"><h3 class="snippet-name">WordScramble</h3><p>Unscramble the letters within the time limit to find the anagram. There is only one solution for each word!</p><div class="snippet-meta"><div class="snippet-tech-title">Built with:</div><p>JavaScript</p></div></a><a href="/projects/set-game" data-ix="snippet" class="snippet w-inline-block"><h3 class="snippet-name">Set Game</h3><p>Find sets of cards, where each of the four card attributes (shape, shading, colour, number) are either the same or different.</p><div class="snippet-meta"><div class="snippet-tech-title">Built with:</div><p>JavaScript</p></div></a><a href="/projects/tic-tac-toe" data-ix="snippet" class="snippet w-inline-block"><h3 class="snippet-name">Tic-Tac-Toe</h3><p>Two players takes turns to select cells in a grid, trying to complete a row, column, or diagonal. Play against the computer or another player.</p><div class="snippet-meta"><div class="snippet-tech-title">Built with:</div><p>JavaScript</p></div></a></div><h2 class="home-header">Resources</h2><ul role="list" class="resources"><li class="list-item"><a href="https://samliew.com/doc/australia-migration-guide" target="_blank" class="resource-link">Australia Migration Guide<br/></a><span class="resource-desc">a comprehensive resource I wrote containing insights and practical guidance about the application process and essential steps involved in migrating to Australia</span></li></ul><h2 class="home-header">Portfolio</h2><div class="items-grid"><a id="w-node-_4d61dfee-ef89-ebeb-b217-e77245a25574-b1b1b9d9" href="/portfolio" class="project-item w-inline-block"><div class="project-item-name-wrap"><h3 class="project-item-name">Singtel Annual Report 2020</h3></div><img src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b4c4b71948541a072ccff3_small.svg" loading="lazy" data-src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/6592e4ee139e1daa376fd153_singtel-ar-2020.jpg" alt="" class="project-image"/></a><a id="w-node-_887e68c2-da1d-9c02-ed51-176f80c47327-b1b1b9d9" href="/portfolio" class="project-item w-inline-block"><div class="project-item-name-wrap"><h3 class="project-item-name">HealthXchange</h3></div><img src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b4c4b71948541a072ccff3_small.svg" loading="lazy" data-src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/6592e4ed18147d2fdf09d986_HealthXchange.jpg" alt="" class="project-image"/></a><a id="w-node-d59973b3-01ec-c144-dba6-98f9870f2fb1-b1b1b9d9" href="/portfolio" class="project-item w-inline-block"><div class="project-item-name-wrap"><h3 class="project-item-name">Squarerooms</h3></div><img src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b4c4b71948541a072ccff3_small.svg" loading="lazy" data-src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/6592e4ed28ad56801f2b7f00_squarerooms.jpg" alt="" class="project-image"/></a><a id="w-node-_379ff8cd-395f-4a7c-f04a-33cceb09d4d2-b1b1b9d9" href="/portfolio" class="project-item w-inline-block"><div class="project-item-name-wrap"><h3 class="project-item-name">Singapore's Child</h3></div><img src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b4c4b71948541a072ccff3_small.svg" loading="lazy" data-src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/6592e4ede84d95473bc3816c_singapores-child.jpg" alt="" class="project-image"/></a><a id="w-node-ab86b706-91d8-b4ad-7dea-b121ebfaf339-b1b1b9d9" href="/portfolio" class="project-item w-inline-block"><div class="project-item-name-wrap"><h3 class="project-item-name">WeR1 Consultants</h3></div><img src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b4c4b71948541a072ccff3_small.svg" loading="lazy" data-src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/6592e4ed3b720634b437685c_WeR1-Consultants.jpg" alt="" class="project-image"/></a><a id="w-node-_2969c6b0-f180-d44c-6416-1a2912d8d563-b1b1b9d9" href="/portfolio" class="project-item w-inline-block"><div class="project-item-name-wrap"><h3 class="project-item-name">VIVIstock</h3></div><img src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/65b4c4b71948541a072ccff3_small.svg" loading="lazy" data-src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/6592e4ee844f5b5a9a3d7e43_VIVIstock.jpg" alt="" class="project-image"/></a></div></div></main><aside class="breadcrumbs bottom"><div class="w-container"><div class="next-page"><div>Next:</div><a href="/about-me">About Me<span class="fa icon-right">></span></a></div></div></aside><footer class="footer-wrap"><div class="w-container"><div class="footer-nav-wrap"><nav class="footer-nav"><a href="/request-quote" class="nav-link footer-link hire-me w-hidden-main w-hidden-medium w-hidden-small w-hidden-tiny">Request Quote</a><a href="/privacy-policy" class="nav-link footer-link">Privacy Policy</a><a href="/terms-of-use" class="nav-link footer-link">Terms of Use</a><a href="/accessibility" class="nav-link footer-link">Accessibility</a><a href="/contact" class="nav-link footer-link">Contact</a><a href="/site-map" class="nav-link footer-link">Sitemap</a></nav><div class="footer-social"><div class="noselect w-embed"><a href="https://www.linkedin.com/in/samuelliew" title="LinkedIn" data-insert-svg="svg-linkedin" class="nav-link footer-link icon"></a>
<a href="https://github.com/samliew" title="Github" data-insert-svg="svg-github" class="nav-link footer-link icon"></a>
<a href="https://stackoverflow.com/users/584192/samuel-liew?tab=profile" title="Stack Overflow" data-insert-svg="svg-stackoverflow" class="nav-link footer-link icon"></a></div></div></div><div class="copyright">© <span id="year">2024</span> Samuel Liew. <span class="mobile-newline">All rights reserved.</span></div></div><div class="hidden w-embed"><!-- SVGs -->
<svg xmlns="http://www.w3.org/2000/svg" style="display:none;">
<symbol id="svg-facebook" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"/></symbol>
<symbol id="svg-instagram" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"/></symbol>
<symbol id="svg-linkedin" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"/></symbol>
<symbol id="svg-stackoverflow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M293.7 300l-181.2-84.5 16.7-36.5 181.3 84.7-16.8 36.3zm48-76L188.2 95.7l-25.5 30.8 153.5 128.3 25.5-30.8zm39.6-31.7L262 32l-32 24 119.3 160.3 32-24zM290.7 311L95 269.7 86.8 309l195.7 41 8.2-39zm31.6 129H42.7V320h-40v160h359.5V320h-40v120zm-39.8-80h-200v39.7h200V360z"/></symbol>
<symbol id="svg-youtube" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M503 131.2c-6.1-28.7-29.1-48.8-55.3-52.1C405.4 74.4 341.4 72 256 72c-85.5 0-149.3 2.4-191.4 7.1-27.7 3.4-49.2 24.4-55.6 52.1-6 27.6-9 69.2-9 124.8 0 56.6 3 98.2 9 124.8 6.2 28.8 29.1 48.9 55.3 51.7 42.4 5 106.3 7.5 191.8 7.5 85.4 0 149.4-2.5 191.7-7.5 27.5-2.9 49-24.3 55.3-51.7 6-27.6 9-69.2 9-124.8-.1-56.6-3.1-98.2-9.1-124.8zM208 328V184l144 72-144 72z"/></symbol>
<symbol id="svg-github" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></symbol>
<symbol id="svg-webflow" width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g><path d="M380.958,182.704C380.958,182.704 339.459,310.704 336.225,321.483C336.225,310.704 304.697,80.843 304.697,80.843C233.825,80.843 196.907,130.157 175.888,182.704C175.888,182.704 125.227,310.974 121.994,321.753C121.994,311.782 114.179,184.052 114.179,184.052C108.303,126.117 59.229,81.366 1,80.843L59.206,429.273C133.581,429.273 173.194,379.69 193.943,327.412C193.943,327.412 238.406,214.233 240.293,209.113C240.293,213.963 272.36,429.542 272.36,429.542C333.677,430.012 388.74,390.868 408.444,332.801L451.499,229.048L513,80.843C439.434,80.843 400.899,130.157 380.958,182.704Z" style="fill-rule:nonzero;"/></g></symbol>
<symbol id="svg-discord" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M297.216 243.2c0 15.616-11.52 28.416-26.112 28.416-14.336 0-26.112-12.8-26.112-28.416s11.52-28.416 26.112-28.416c14.592 0 26.112 12.8 26.112 28.416zm-119.552-28.416c-14.592 0-26.112 12.8-26.112 28.416s11.776 28.416 26.112 28.416c14.592 0 26.112-12.8 26.112-28.416.256-15.616-11.52-28.416-26.112-28.416zM448 52.736V512c-64.494-56.994-43.868-38.128-118.784-107.776l13.568 47.36H52.48C23.552 451.584 0 428.032 0 398.848V52.736C0 23.552 23.552 0 52.48 0h343.04C424.448 0 448 23.552 448 52.736zm-72.96 242.688c0-82.432-36.864-149.248-36.864-149.248-36.864-27.648-71.936-26.88-71.936-26.88l-3.584 4.096c43.52 13.312 63.744 32.512 63.744 32.512-60.811-33.329-132.244-33.335-191.232-7.424-9.472 4.352-15.104 7.424-15.104 7.424s21.248-20.224 67.328-33.536l-2.56-3.072s-35.072-.768-71.936 26.88c0 0-36.864 66.816-36.864 149.248 0 0 21.504 37.12 78.08 38.912 0 0 9.472-11.52 17.152-21.248-32.512-9.728-44.8-30.208-44.8-30.208 3.766 2.636 9.976 6.053 10.496 6.4 43.21 24.198 104.588 32.126 159.744 8.96 8.96-3.328 18.944-8.192 29.44-15.104 0 0-12.8 20.992-46.336 30.464 7.68 9.728 16.896 20.736 16.896 20.736 56.576-1.792 78.336-38.912 78.336-38.912z"/></symbol>
<symbol id="svg-telegram" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M446.7 98.6l-67.6 318.8c-5.1 22.5-18.4 28.1-37.3 17.5l-103-75.9-49.7 47.8c-5.5 5.5-10.1 10.1-20.7 10.1l7.4-104.9 190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8 284 16.2 252.2c-22.1-6.9-22.5-22.1 4.6-32.7L418.2 66.4c18.4-6.9 34.5 4.1 28.5 32.2z"/></symbol>
<symbol id="svg-chevron-right" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path d="M24.707 38.101L4.908 57.899c-4.686 4.686-4.686 12.284 0 16.971L185.607 256 4.908 437.13c-4.686 4.686-4.686 12.284 0 16.971L24.707 473.9c4.686 4.686 12.284 4.686 16.971 0l209.414-209.414c4.686-4.686 4.686-12.284 0-16.971L41.678 38.101c-4.687-4.687-12.285-4.687-16.971 0z"/></symbol>
<symbol id="svg-chevron-left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path d="M231.293 473.899l19.799-19.799c4.686-4.686 4.686-12.284 0-16.971L70.393 256 251.092 74.87c4.686-4.686 4.686-12.284 0-16.971L231.293 38.1c-4.686-4.686-12.284-4.686-16.971 0L4.908 247.515c-4.686 4.686-4.686 12.284 0 16.971L214.322 473.9c4.687 4.686 12.285 4.686 16.971-.001z"/></symbol>
<symbol id="svg-external-link" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M576 14.4l-.174 163.2c0 7.953-6.447 14.4-14.4 14.4H528.12c-8.067 0-14.56-6.626-14.397-14.691l2.717-73.627-2.062-2.062-278.863 278.865c-4.686 4.686-12.284 4.686-16.971 0l-23.029-23.029c-4.686-4.686-4.686-12.284 0-16.971L474.379 61.621l-2.062-2.062-73.626 2.717C390.626 62.44 384 55.946 384 47.879V14.574c0-7.953 6.447-14.4 14.4-14.4L561.6 0c7.953 0 14.4 6.447 14.4 14.4zM427.515 233.74l-24 24a12.002 12.002 0 0 0-3.515 8.485V458a6 6 0 0 1-6 6H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h301.976c10.691 0 16.045-12.926 8.485-20.485l-24-24A12.002 12.002 0 0 0 331.976 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V242.225c0-10.691-12.926-16.045-20.485-8.485z"/></symbol>
<symbol id="svg-check" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z" class="st0"/></symbol>
<symbol id="svg-times" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M231.6 256l130.1-130.1c4.7-4.7 4.7-12.3 0-17l-22.6-22.6c-4.7-4.7-12.3-4.7-17 0L192 216.4 61.9 86.3c-4.7-4.7-12.3-4.7-17 0l-22.6 22.6c-4.7 4.7-4.7 12.3 0 17L152.4 256 22.3 386.1c-4.7 4.7-4.7 12.3 0 17l22.6 22.6c4.7 4.7 12.3 4.7 17 0L192 295.6l130.1 130.1c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17L231.6 256z"/></symbol>
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M502.646 70.625L441.393 9.375C435.391 3.371 427.252 0 418.766 0H256C220.652 0 191.998 28.656 192 64.004L192.02 320.004C192.021 355.352 220.676 384 256.02 384H448.02C483.219 384 512.02 355.199 512.02 320V93.254C512.02 84.766 508.648 76.629 502.646 70.625ZM464.021 320C464.021 328.836 456.857 336 448.021 336H256.018C247.18 336 240.018 328.836 240.018 320L240 64.125C240 55.289 247.164 48.125 256 48.125H384.027V96C384.027 113.672 398.354 128 416.027 128H464.021V320ZM272.021 448C272.021 456.836 264.857 464 256.021 464H64.018C55.18 464 48.018 456.836 48.018 448L48 192.125C48 183.289 55.164 176.125 64 176.125H160.02V128H64C28.652 128 -0.002 156.656 0 192.004L0.02 448.004C0.021 483.352 28.676 512 64.02 512H256.02C291.219 512 320.02 483.199 320.02 448V416H272.021V448Z"/></symbol>
</svg></div><div class="hidden w-embed"><style>
html, body { overflow-x: hidden; }
html.noscroll, html.noscroll body { overflow-y: hidden; }
body { fill: currentColor; }
svg { max-width: 100%; max-height: 100%; fill: currentColor; }
.nowrap { white-space: nowrap; }
.noselect, header, footer, img, .noselect, .button, .blockquote-quote, .breadcrumbs, #mq { user-select: none; }
.noinput { pointer-events: none; }
.w-embed:before, .w-embed:after,
.w-clearfix:before, .w-clearfix:after,
.w-richtext:before, .w-richtext:after {
display: none !important;
content: unset !important;
clear: none !important;
}
/* Selection */
::selection { background: #cee4e3; }
::-moz-selection { background: #cee4e3; }
input:focus { outline:none; }
/* Scrollbar */
::-webkit-scrollbar{ width:8px;height:8px;}
::-webkit-scrollbar-thumb{ background-color:rgb(196, 196, 196); border-radius: 5; }
::-webkit-scrollbar-thumb:hover{ background-color:rgb(196, 196, 196); }
::-webkit-scrollbar-track{ background-color:rgba(255, 255, 255, 0); }
/* Menu */
.menu-button.w--open .menu-line {
transform-origin: center;
}
.menu-button.w--open .menu-line-1 {
transform: translate(0%, 220%) rotate(45deg) scale(1.1);
}
.menu-button.w--open .menu-line-2 {
opacity: 0;
}
.menu-button.w--open .menu-line-3 {
transform: translate(0%, -220%) rotate(-45deg) scale(1.1);
}
/* Form elements */
html input[disabled], button[disabled], .button[disabled] {
filter: grayscale(0.5) saturate(0.5);
pointer-events: none;
}
.w-checkbox, .w-radio { padding-left: 0; }
@media screen and (max-width: 991px) {
.w-checkbox, .w-radio { margin-bottom: 10px; }
}
.toggle-field {
display: inline-flex;
}
.w-checkbox, input[type="checkbox"] {
appearance: none !important;
-webkit-appearance: none !important;
}
.w-checkbox:checked, input[type="checkbox"]:checked {
background-position: right center;
}
select, .w-select {
padding-right: 2.5em !important;
-moz-appearance: none;
-webkit-appearance: none;
appearance: none;
background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path style="fill:%23444;" d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" /></svg>') right 1em center / 0.75em no-repeat;
}
/* Other elements */
.social-widget iframe { width: 100% !important; }
a.project-item:focus-visible .project-item-name-wrap {
background-color: var(--dark-slate-blue);
opacity: .95;
}
.fa {
display: inline-flex;
}
/* Dark mode
@media (prefers-color-scheme: dark) {
::selection { background: rgb(206 228 227 / 25%); }
::-moz-selection { background: rgb(206 228 227 / 25%); }
body, .header, .footer-wrap, .site-tagline, .content-wrap, .main-quote-wrapper, .snippet, .nric-box, .blog-list-item-cal {
background-color: #222;
color: #ddd !important;
}
.site-title, a, .snippet-name, .button:hover {
background-color: inherit;
color: #aa6 !important;
}
.button, .main-quote, .main-quote.animate, .breadcrumbs, .project-item-name-wrap,
blockquote, blockquote:hover, .snippet:hover, .w-input, .w-select, .msg, .breadcrumb-arrow {
background-color: #444;
color: #fff !important;
}
#barcode-container { background-color: black; }
}
/* Disable enquiry forms
@media screen and (min-width: 1px) {
a[href*='/services'],
a[href*='/request-quote'],
.enquiry-section {
display: none !important;
}
.enquiry-section.unavailable-notice {
display: block !important;
}
#project-help-msg a[href*='/request-quote'] {
display: inline !important;
}
} */
</style></div></footer><div class="w-embed"><label class="site-theme-toggle m-0" for="toggle-site-theme" title="toggle dark theme" aria-label="toggle dark theme" aria-hidden="true"><input type="checkbox" id="toggle-site-theme" class="toggle-theme"></label>
<style>
.site-theme-toggle .toggle-theme {
transition: background 0.15 ease-out;
}
.site-theme-toggle .toggle-theme:checked {
background-color: transparent;
background-image: none;
background-position: left 49% center;
}
body.dark-mode {
background-color: #1c1c1c;
}
body.dark-mode header,
body.dark-mode .content-wrap,
body.dark-mode .breadcrumbs,
body.dark-mode footer {
-webkit-filter: invert(1);
filter: invert(1);
}
</style></div><script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=5645ec632404c4fe414daa63" type="text/javascript" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script><script src="https://assets-global.website-files.com/5645ec632404c4fe414daa63/js/samliew.28018f2cc.js" type="text/javascript"></script><link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400&display=swap" rel="stylesheet">
<style>body { font-family: "Open Sans", Arial, sans-serif; }</style>
<script>
(() => {
// Dark theme toggle
const themeToggle = document.querySelector('#toggle-site-theme');
themeToggle?.addEventListener('change', evt => {
document.body.classList.toggle('dark-mode', evt.target.checked);
});
// Copyright year
const yearEl = document.querySelector('#year');
if (yearEl) yearEl.textContent = new Date().getFullYear();
// All external links open in a new window
document.querySelectorAll('a').forEach(a => {
if (!a.href.startsWith(window.location.origin)) a.target = "_blank";
});
// Auto-populate form fields based on query string
const queryString = key => new URLSearchParams(window.location.search).get(key);
document.querySelectorAll('input, textarea, select').forEach(el => {
const paramValue = queryString(el.id || el.name);
switch (el.type) {
case 'radio':
if (el.value === paramValue) el.checked = true;
break;
case 'checkbox':
if (paramValue === 'true') el.checked = true;
break;
default:
el.value ||= paramValue ?? '';
}
});
// Insert SVGs into element placeholders
document.querySelectorAll('.breadcrumbs .icon-right, .breadcrumb-arrow').forEach(el => {
el.dataset.insertSvg = 'svg-chevron-right';
});
document.querySelectorAll('.breadcrumbs .icon-left').forEach(el => {
el.dataset.insertSvg = 'svg-chevron-left';
});
document.querySelectorAll('[data-insert-svg]').forEach(el => {
const id = el.dataset.insertSvg;
if (id) el.innerHTML = \`<svg><use xlink:href="#\${id}"></use></svg>\`;
});
// When header logo is selected, scroll to top of page
document.querySelector('#header-logo, a.brand')?.addEventListener('focus', _evt => window.scrollTo(0, 0));
// Skip to content elements
const contentEl = [...document.querySelectorAll('h1, h2, .content, .content-wrap, p')].shift();
contentEl?.setAttribute('id', 'content');
contentEl?.setAttribute('tabindex', '-1');
const skipLink = document.querySelector('#skip-to-content');
skipLink?.addEventListener('click', evt => {
contentEl.contentEditable = true;
contentEl.focus();
contentEl.contentEditable = false;
history.replaceState(null, document.title, location.origin + location.pathname);
});
// Options with no value not to be shown
document.querySelectorAll('option').forEach(el => {
if (el.value === '') el.style.display = 'none';
});
// When any element focused but hidden by navbar
document.addEventListener('focusin', evt => {
const target = evt.target;
const isContainer = /(^|\\s)(container|content)/.test(target.className);
const isNav = target.closest('header');
const box = target.getBoundingClientRect().top;
if (!isContainer && !isNav && box < 100) window.scrollBy(0, -150);
});
// Spam blocklist
const blacklist = 'domainreg|terminate|immediate attention|absolutely necessary'.split('|');
document.querySelectorAll('input, textarea').forEach(el => {
el.addEventListener('input', evt => {
const value = evt.target.value;
if (blacklist.some(v => value.includes(v)) || value.match(/[A-Z]/g) * 2 > value.length) {
evt.preventDefault();
window.history.replaceState({}, '', '/');
window.location.href = '/';
}
});
});
// CMS auto pagination based on sitemap
const pagerEl = document.querySelector('.cms-pagination');
if (pagerEl && location.pathname.split('/').length === 3) {
const collectionBaseUrl = location.href.replace(/[^/]+\$/, '');
(async () => {
// Get and parse sitemap for collection items
const req = await fetch('/sitemap.xml');
const reqBody = await req.text();
const data = reqBody.replace(/[\\r\\n\\s]+/g, '');
const urls = data.match(/<loc>(.*?)<\\/loc>/g).map(v => v.replace(/<\\/?loc>/g, ''));
const items = urls.filter(v => v.includes(collectionBaseUrl));
const currentIndex = items.indexOf(location.href);
// Set Prev link
const first = pagerEl.children[0];
if (currentIndex <= 0) {
first.style.visibility = 'hidden';
first.style.pointerEvents = 'none';
}
else {
first.setAttribute('href', items[currentIndex - 1]);
}
// Set Next link
const last = pagerEl.children[1];
if (currentIndex >= items.length - 1) {
last.style.visibility = 'hidden';
last.style.pointerEvents = 'none';
}
else {
last.setAttribute('href', items[currentIndex + 1]);
}
})();
}
})();
</script>
<!-- Google tag (gtag.js) -->
<script async defer src="https://www.googletagmanager.com/gtag/js?id=G-MLNPEJERJZ"></script>
<script async defer>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-MLNPEJERJZ');</script><script defer>setTimeout(() => document.querySelectorAll('[data-src]').forEach(img => img.src = img.dataset.src), 50);</script></body></html>`;
// Reset `lastIndex` if this regex is defined globally
// regex.lastIndex = 0;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions