<?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: Regex Constraint issue with string length, when that is not part of the constraint in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/regex-constraint-issue-with-string-length-when/m-p/1132177#M39646</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/251557"&gt;@ZacharySutherby&lt;/a&gt;. Is there a way to adapt this to account for a string of any length? The string that a user will enter could be any length.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jan 2022 20:20:13 GMT</pubDate>
    <dc:creator>GrantZ</dc:creator>
    <dc:date>2022-01-10T20:20:13Z</dc:date>
    <item>
      <title>Regex Constraint issue with string length, when that is not part of the constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/regex-constraint-issue-with-string-length-when/m-p/1132085#M39636</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm having an issue implementing a constraint to a text field in a survey I'm designing. The string input can be any length, but it can only consist of the characters 0, 1, and 2. Any other character should throw a flag. What I've currently implemented is:&lt;/P&gt;&lt;TABLE width="159"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="159"&gt;regex(.,'^[0-2]*$')&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This tends to work -- however, it only works for the first two characters in the string. If the string is any longer than two characters, it throws the constraint flag (strangely, the error message appears like this, instead of tied to the question, as it usually does/should) :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GrantZ_0-1641833867517.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/31109iA5CF3022CDA4A488/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GrantZ_0-1641833867517.png" alt="GrantZ_0-1641833867517.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have no experience writing regex, so any help would be useful. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 16:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/regex-constraint-issue-with-string-length-when/m-p/1132085#M39636</guid>
      <dc:creator>GrantZ</dc:creator>
      <dc:date>2022-01-10T16:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Constraint issue with string length, when that is not part of the constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/regex-constraint-issue-with-string-length-when/m-p/1132150#M39640</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/480609"&gt;@GrantZ&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using&amp;nbsp;regex(.,'[0-2][0-2][0-2]') would be one way to reach the regex you are looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 19:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/regex-constraint-issue-with-string-length-when/m-p/1132150#M39640</guid>
      <dc:creator>ZacharySutherby</dc:creator>
      <dc:date>2022-01-10T19:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Constraint issue with string length, when that is not part of the constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/regex-constraint-issue-with-string-length-when/m-p/1132177#M39646</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/251557"&gt;@ZacharySutherby&lt;/a&gt;. Is there a way to adapt this to account for a string of any length? The string that a user will enter could be any length.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 20:20:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/regex-constraint-issue-with-string-length-when/m-p/1132177#M39646</guid>
      <dc:creator>GrantZ</dc:creator>
      <dc:date>2022-01-10T20:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Constraint issue with string length, when that is not part of the constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/regex-constraint-issue-with-string-length-when/m-p/1132634#M39681</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/480609"&gt;@GrantZ&lt;/a&gt;, is the field type for the entry you're using the regex on a text/string field?&amp;nbsp; If so, Survey123 will give it a length of 255 characters by default in the hosted feature services it creates when the S123 form is published to ArcGIS Online, so I think you could adjust the regex to match this character length.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 21:48:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/regex-constraint-issue-with-string-length-when/m-p/1132634#M39681</guid>
      <dc:creator>ThomasHamill</dc:creator>
      <dc:date>2022-01-11T21:48:48Z</dc:date>
    </item>
  </channel>
</rss>

