Lava Filters - RegExMatch
Category:Text
Description:Tests the input against a Regular Expression to determine if it is a match.
Input: "CurrentPerson": {
"Email": "ted@rocksolidchurchdemo.com"
}
Lava: {% capture expression %}\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*{% endcapture %}
{% assign isValidEmail = CurrentPerson.Email | RegExMatch: expression %}
{% if isValidEmail %}
This is a valid email!
{% endif %}
Output: This is a valid email!