Lava Filters - RegExMatchValue
Category:Text
Description:Tests the input against a
Regular Expression and returns the matching substring if a match is made; otherwise it returns nothing.
Input:
Lava: {% capture expression %}\d+{% endcapture %}
{% assign message = "group 12345" %}
{% assign groupId = message | RegExMatchValue: expression %}
{{ groupId }}
Output: 12345