Select to view content in your preferred language

Add RegEx support to Arcade

2741
5
11-19-2021 07:31 AM
Status: Open
Labels (1)
AJR
by
Frequent Contributor

Please add regex support within arcade expressions.  This would be really useful for defining attribute constraints.  As an example, I can use the function below in Python to check to see if a string is a guid, it would be nice to be able to use a regex within an arcade attribute constraint to accomplish a similar task.

AJR_0-1637336235796.png

 

5 Comments
JoshuaBixby

@AJR, you make good music and do GIS too, impressive. 🙂

Adding regex support to Arcade is a great idea, definitely worth a vote, but it will be quite a lift for Esri to do it.  I will cross my fingers, just not hold my breath. 

OlabanjiAladejana

Yes. This will definitely be nice to have.

feralcatcolonist_old

A Google search for something I was sure already existed led me here. So let's make it happen!

Esri, if you're wondering about the use case...

I'm making an attribute rule to concatenate NENA Address components to make a full address. Apparently, an address suffix that is an alpha ("A", "B", "C") needs to be concatenated to the address number without a space; whereas, a numeric ("1/2", "3/4") needs a space

https://gis.ny.gov/streets/documents/MoreStreetAddressParsing-2014.pdf

Kara_Shindle

Was just looking to add my first attribute rule and find that it only supports Arcade, not Python!  I had wanted to use some regular expressions for formatting my phone numbers and email fields - something I can do on Survey123.

DavidSolari

Shocked this hasn't been at least considered, from what I know of how Arcade is implemented this is trivial due to language-level support in JavaScript. If ESRI is concerned with sloppy expressions causing load issues in ArcGIS Online (very difficult as regex is supposed to evaluate client-side, but I'm sure there's a way to cause mayhem somehow) then limiting their Profile set as a trial would be a good start.