Regex expressions
You can now use regex expressions in your templates.
Being possible does not mean you should use them. You’d betterkeep the regex on the component side and not in the template.
If the interpolation is meant to evaluate a JavaScript expression, some of them were not supported yet. The regex expression is part of them.
Exercise
Test the URL domain with a regex expression:
<div class="website-info"> <p> Domain: {{ websiteUrl.match(/^https?:\/\/([^\/]+)/)?.[1] || 'Invalid URL' }} </p></div>Files
Preparing Environment
- Installing dependencies
- Start the application