Unfortunately Axure only allows variables or sting literals to be used with replace() and not RegExp like you might expect. It would honestly make so many things much easier if we could. You could probably do something like this instead:
[[LVAR1.substring(0,indexOf(’(’))]] Assuming of course the parentheses are always going to be after the text you want to keep nor any text after you also want.
[[LVAR1.substring(0,indexOf(’(’))]] doesn’t seem to work for me - it just plonks all that into the widget as plain text. Is there something I’m missing?
Excellent - thanks! I need to get my head around how Axure works with this stuff.
Coincidentally, I’d just had a chat with somebody who was saying they liked to use Framer for prototyping b/c you can use JavaScript regexps into it when you need to. I said Axure did that too. But I now have apologise to her for lying
If you’re comfortable with JS you can do some really cool stuff very easily with Framer. I’ve played around with it and liked it. I certainly wouldn’t call it a replacement for Axure for everyone but what it’s good at is really cool.
Yes, I’d characterise Framer as a motion design prototyping tool, while Axure is an interaction design prototyping tool. Motion design is one of those things that’s a bit out of reach of most designers, and so gets left to libraries and the whim of engineers quite a bit. Framer addresses that quite well, although the level of JS you need it pretty high to make good use of it.
Which, at the risk of going even further OT, reminds of conversations I’ve had with devs about Axure. “Dude you could all that with just JS.” “Yes, but then I’d be working as a developer, not a designer.” It’s perhaps a subtle, but rather important, point!