[feature-4810]Expression function for Regex

I see you can pass a regular expression into the Split function, but could we get a ‘Regex’ function that evaluates a string against an expression?

Should be no problem. Something like a simple “boolean matches(string,pattern)”, right?


Does this exist?

Doesn’t look like anything ever happened as a result of this post.

@Kevin.Herron do you have a recommendation for input validation in Perspective similar to what I would do in JavaScript? I was hoping to use a regular expression on a label and show a message if the expression did not match, then only allow the data to be submitted to the DB when all regular expressions were met. The only reason I was hoping to use regular expressions was so I could set the binds on all labels to be the same then pass the expression to the label as defined in a higher container component. Seems like maybe an onChange script would work but when that is done in Python does it have to go all the way back to the Gateway to check the validation on each change event fire? Seems like the Vision Custom input is doing in on the front end. If you have some recommendation or documentation I can reference that would be awesome!

I don’t want to suggest anything because I’m not that familiar with Perspective, and I’m sure someone else can chime in with ideas. You might start a new topic about it.

But I will say that expressions also evaluate on the gateway. There’s no logic running client side in the Perspective session.

Interesting! Thanks for the feedback. I’ll do that.

RE: Perspective input forms in particular, there are some things cooking that would help you, but nothing in the short term.

RE: A regex expression function(s), there’s actually a longstanding ticket on the backlog that came up independently from this original thread with Colby.