<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Data Reviewer Regular Expression Check in ArcGIS Data Reviewer Questions</title>
    <link>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309142#M479</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was using scripting logic since your conditions are too convoluted for a regular expression unless you can guarantee that there will always be 3 dashes (hence 4 bits) yielding 4 parts and parts 1,2 and 4 will be of size , 2, 2 and 3. &amp;nbsp;This yields the final logic test of tf (true/false) where the length of the split string has 4 parts, the first 2 bits of the split string are of size 2 and the last one is 3 .... [4, 2, 2, 3] . &amp;nbsp;If any of that fails, then one of the conditions isn't met&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Oct 2016 15:36:56 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-10-12T15:36:56Z</dc:date>
    <item>
      <title>Data Reviewer Regular Expression Check</title>
      <link>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309139#M476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am very new to the Data Reviewer extension, so I'm a little confused on how to format the expression parameters.&amp;nbsp; I would like to utilize the extension to check a whole number of fields, but I'll get started with one in particular that is somewhat troublesome in terms of how to structure the regular expression. &lt;BR /&gt;&lt;BR /&gt;We have a field that denotes the ID of the project that the feature is associated with.&amp;nbsp; The ID is structured as such:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XX-YY-ZZZZZZZZ-ABC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"XX" and "YY" are always 2 characters each.&amp;nbsp;&lt;/P&gt;&lt;P&gt;"ABC" is always 3 characters.&lt;/P&gt;&lt;P&gt;"ZZZZZZZZ" can range from between 4-8 characters long.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Is there a way to format the regular expression to return anything that doesn't adhere to the&amp;nbsp; structure?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 20:27:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309139#M476</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-10-11T20:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Data Reviewer Regular Expression Check</title>
      <link>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309140#M477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;check for dashes.... a.count("-") == 3 ?? no? &amp;nbsp;bail&lt;/LI&gt;&lt;LI&gt;split the string and count the sub lists&lt;/LI&gt;&lt;LI&gt;parse the 'r' to get the length of r, the length of 2 first two and last sub array&lt;/LI&gt;&lt;LI&gt;is it true? &amp;nbsp;bail otherwise&lt;/LI&gt;&lt;LI&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; a&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"XX-YY-ZZZZZZZZ-ABC"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; r &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"-"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; tf &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;r&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; r&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; tf
&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;implement if you can in your environment using the above as a demo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:47:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309140#M477</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T14:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Data Reviewer Regular Expression Check</title>
      <link>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309141#M478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for the suggested code.&amp;nbsp;&amp;nbsp; Just to clarify, this is something I would actually implement within a script and not within the data reviewer tool, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 15:17:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309141#M478</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-10-12T15:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Data Reviewer Regular Expression Check</title>
      <link>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309142#M479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was using scripting logic since your conditions are too convoluted for a regular expression unless you can guarantee that there will always be 3 dashes (hence 4 bits) yielding 4 parts and parts 1,2 and 4 will be of size , 2, 2 and 3. &amp;nbsp;This yields the final logic test of tf (true/false) where the length of the split string has 4 parts, the first 2 bits of the split string are of size 2 and the last one is 3 .... [4, 2, 2, 3] . &amp;nbsp;If any of that fails, then one of the conditions isn't met&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 15:36:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309142#M479</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-12T15:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Data Reviewer Regular Expression Check</title>
      <link>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309143#M480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, there will always be 4 bits, with the first two being 2 characters each, and the last bit being 3 characters.&amp;nbsp; The 3rd bit is what can differ, being anywhere from 4-8 characters.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;12-12-12345-123&lt;/P&gt;&lt;P&gt;12-12-123456-123&lt;/P&gt;&lt;P&gt;12-12-12345-123&lt;/P&gt;&lt;P&gt;12-12-12345678-123&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's basically what the listing of ID's looks like (broken into character counts).&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 15:41:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309143#M480</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-10-12T15:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Data Reviewer Regular Expression Check</title>
      <link>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309144#M481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then I don't follow... if the string can be parsed into 4 pieces by splitting it on a - and the first 2 will always be 2 characters in length and the last 3, then there is nothing to check and you can decide what to do.... for example&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"12-12-alsdjf-2016"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; bit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"-"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; bit
&lt;SPAN class="string token"&gt;'alsdjf'&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;z &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"-"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"-"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; z
&lt;SPAN class="string token"&gt;'12-12-2016'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:47:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309144#M481</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T14:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Data Reviewer Regular Expression Check</title>
      <link>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309145#M482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should clarify that the ID format of 12-12-12345678-123 is what the data should be, but the point of the check is to ensure that the data is indeed in that format.&amp;nbsp; I wanted to use the Data Reviewer extension to constantly monitor all newly added features to ensure that the inputs were adhering to the standardized input that we have in place.&amp;nbsp; Anything that didn't adhere to this would be flagged and sent to the data reviewer log table.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;There are instances where users have entered completely wrong input formats, and there are other times where users were careless during a load process and inadvertently mapped the wrong fields to where they should have gone.&amp;nbsp; I want those instances to be called out to our attention, and the data reviewer extension seemed to be the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 16:11:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309145#M482</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-10-12T16:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Data Reviewer Regular Expression Check</title>
      <link>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309146#M483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then my original suggestions apply since the 3rd term can be anything as long as it is something. &amp;nbsp;4 bits, of size [2,2,anything,3]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 16:21:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-data-reviewer-questions/data-reviewer-regular-expression-check/m-p/309146#M483</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-12T16:21:49Z</dc:date>
    </item>
  </channel>
</rss>

