I’m using a regex extraction to get a URL from a string, but when I try to insert a variable from WeWeb as a variable into my JS code, the formatting seems to be messing it up. Has anyone else run into this?
Here is the code, an example variable would be any string in the format “location: https://…”
When I set this to the text variable directly (instead of passing through the WeWeb syntax representing this value), it works properly (the URL is extracted and the value is returned).
there is no such thing as weweb syntax. It’s just javascript. In the context of the function there is an object variables with the values of the variables created in weweb.
If it is returning an unexpected result it’s because you are giving it the wrong input.
You can debug it in a lot of ways, for example log the text variable in the console to see what you are working with.