Elements that match a regular expression in a datatable

Here’s how you can do it in one line using an assign activity. The result of the below code is a boolean, true if every row in column 0 (1st column) matches a regex expression. You’ll need to add System.Text.RegularExpressions on your import list to avoid making this look too messy:

dt.AsEnumerable.All(function(r) regex.isMatch(r(0).ToString, "myRegexPattern"))
1 Like