Sign in to Community
Sign in to view all badges
How can I match a string against a regular expression in HTL?
I would want to do one thing if it matches and another if it doesn't.
Alternatively, if HTL does not have that capability built in, is there a way that I can pass a string into a utility method to do that?
When you say Template - do you mean the component code?
Anyhow - if you want to perform this task in the HTL itself (I would recommend Java and Sling Models and use HTL as a view), - see:
htl-spec/SPECIFICATION.md at master · adobe/htl-spec · GitHub