I have ArcGIS Pro 3.2 Advanced with no additional licenses. I want to create a definition query to query my address2 field for any upper and lower cases letters or numbers. I am trying to isolate where blank cells and spaces are improperly imported from excel. I am currently messing around with a definition query to get my table view to show the selection I want. I have 4,460 records and 3,857 are blank.
When I construct my definition query:
where address2 NOT LIKE '%([A-Za-z0-9])%'
This should query out value in address2 that has an upper or lower case letter A through Z and any number 0 through 9.
but it only excludes 2 records, is ArcGIS Pro unable to support ranges and regular expressions?
I have tried several variations of my range to include word boundary \b, and + signs.
I currently have it written the most difficult way of each individual letter and number........
Edit: This is in a file geodatabase, and I tried to construct the definition query by adding a standalone table to the map and building it in the sql expression builder window. Specifically using the radio button to write out my own sql expression.
The SQL LIKE predicate is a form of pattern matching, but it is not regular expression pattern matching. Although support for SQL LIKE is much more consistent across database platforms than regular expressions, there may be cases where it is implementation specific, so it is best to state what data source you are working with.
UPDATE: An update to the question indicates you are working with file geodatabase data.
As I mentioned already, SQL LIKE is not regular expression, and regular expression patterns will not work with LIKE, especially since Esri does not support character-class wildcards with the file geodatabase implementation of LIKE.
Although undocumented, Esri does support a fairly robust regular expression implementation in the file geodatabase with the SIMILAR TO predicate. Oddly, they even kept the wildcard the same as LIKE even though actual regular expression uses different wildcards.