Share feedback, ideas and get community help

Updated 5 months ago

Hello folks! Let's say....

At a glance

The community member has a "condition" node where the variable var is set to "foobar". They want to use a regular expression to match the value of var and then access the matched text in the next block. A community member suggests using a "set variable" block with custom code to achieve this.

A node of "condition" where var=foobar
if {{var}} matches /(foobar)/i
OK! Match!
How can I get this regex match "foobar" on the next block? Something like $1 or \1, even matches[0] ?
Thank you!
B
1 comment
You should do it in a set variable block with custom code
Add a reply
Sign up and join the conversation on Discord