<?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 Web Designer Constraint regular expression fail to publish when using $ in regex in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1660082#M64541</link>
    <description>&lt;P&gt;&lt;BR /&gt;In the Survey123 Web Designer constraints I want my string field to only include letters, numbers, and spaces. My understanding is that the regex would be: regex(.,'^[a-zA-Z0-9 ]+$')... however this fails to publish.&lt;/P&gt;&lt;P&gt;I'm entering this in the UI in Web Designer&lt;/P&gt;&lt;LI-CODE lang="c"&gt;^[a-zA-Z0-9 ]+$&lt;/LI-CODE&gt;&lt;P&gt;I've tried many many different things and it seems like the fail happens because of how $ is being handled as is passes&amp;nbsp;^[a-zA-Z0-9 ]+$ from the UI to syntax. Excluding $ does not solve the issue - it publishes but passes the constraint no matter what is entered in the string.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Publishing seems to be taking what should be regex(.,'^[a-zA-Z0-9 ]+$') and turning&amp;nbsp;it into&amp;nbsp;regex(.,'^[a-zA-Z0-9 ]+)) and failing to publish.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;.*['"].*&lt;/LI-CODE&gt;&lt;P&gt;works in the opposite way... like the constraint would only pass if my string includes a special character. So don't want that.&lt;/P&gt;&lt;P&gt;Goal:&lt;/P&gt;&lt;P&gt;Santa's Workshop = fail the constraint and show the message&lt;/P&gt;&lt;P&gt;Santas Workshop = pass the constraint and allow to submit&lt;BR /&gt;&lt;BR /&gt;So how would I get this to happen if I can't use $ in the syntax without moving to survey123 connect??&lt;/P&gt;</description>
    <pubDate>Thu, 23 Oct 2025 18:03:31 GMT</pubDate>
    <dc:creator>Teresa_Blader</dc:creator>
    <dc:date>2025-10-23T18:03:31Z</dc:date>
    <item>
      <title>Web Designer Constraint regular expression fail to publish when using $ in regex</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1660082#M64541</link>
      <description>&lt;P&gt;&lt;BR /&gt;In the Survey123 Web Designer constraints I want my string field to only include letters, numbers, and spaces. My understanding is that the regex would be: regex(.,'^[a-zA-Z0-9 ]+$')... however this fails to publish.&lt;/P&gt;&lt;P&gt;I'm entering this in the UI in Web Designer&lt;/P&gt;&lt;LI-CODE lang="c"&gt;^[a-zA-Z0-9 ]+$&lt;/LI-CODE&gt;&lt;P&gt;I've tried many many different things and it seems like the fail happens because of how $ is being handled as is passes&amp;nbsp;^[a-zA-Z0-9 ]+$ from the UI to syntax. Excluding $ does not solve the issue - it publishes but passes the constraint no matter what is entered in the string.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Publishing seems to be taking what should be regex(.,'^[a-zA-Z0-9 ]+$') and turning&amp;nbsp;it into&amp;nbsp;regex(.,'^[a-zA-Z0-9 ]+)) and failing to publish.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;.*['"].*&lt;/LI-CODE&gt;&lt;P&gt;works in the opposite way... like the constraint would only pass if my string includes a special character. So don't want that.&lt;/P&gt;&lt;P&gt;Goal:&lt;/P&gt;&lt;P&gt;Santa's Workshop = fail the constraint and show the message&lt;/P&gt;&lt;P&gt;Santas Workshop = pass the constraint and allow to submit&lt;BR /&gt;&lt;BR /&gt;So how would I get this to happen if I can't use $ in the syntax without moving to survey123 connect??&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 18:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1660082#M64541</guid>
      <dc:creator>Teresa_Blader</dc:creator>
      <dc:date>2025-10-23T18:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Web Designer Constraint regular expression fail to publish when using $ in regex</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1660092#M64542</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Teresa_Blader_0-1761242972536.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/142455i53F78E03477674D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Teresa_Blader_0-1761242972536.png" alt="Teresa_Blader_0-1761242972536.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ERROR WHEN PUBLISHING:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;999: b"ODK Validate Errors:\n&amp;gt;&amp;gt; XForm is invalid. See above for the errors.\norg.javarosa.xform.parse.XFormParseException: bind for ${Theme} contains invalid constraint expression [regex(.,'^[a-zA-Z0-9 ]+))] Couldn't understand the expression starting at this point: regex(.,\xcd\x8e'^[a-zA-Z0-9 ]+...\n\nResult: Invalid"&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 23 Oct 2025 18:10:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1660092#M64542</guid>
      <dc:creator>Teresa_Blader</dc:creator>
      <dc:date>2025-10-23T18:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Web Designer Constraint regular expression fail to publish when using $ in regex</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1660431#M64555</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/425496"&gt;@Teresa_Blader&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible to add the constraint in a hidden field?&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/hidden-field/td-p/845587" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-survey123-questions/hidden-field/td-p/845587&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Once the hidden field is added, changing the default value to be this:&amp;nbsp;"^[a-zA-Z0-9 ]+$" with quotes and everything, then once you're wanting to validate put in the validation section something like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;regex(., ${pattern_helper})&lt;/P&gt;&lt;P&gt;I believe that the formatting is causing the issue, but the variable reference may end up passing this validation check.&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 11:50:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1660431#M64555</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2025-10-24T11:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Web Designer Constraint regular expression fail to publish when using $ in regex</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1660547#M64558</link>
      <description>&lt;P&gt;That's such a great idea BUT regular expressions right now only allow "value" and "field" is not available in the dropdown&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":loudly_crying_face:"&gt;😭&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Teresa_Blader_1-1761321234257.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/142560iC75E85821EBE9403/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Teresa_Blader_1-1761321234257.png" alt="Teresa_Blader_1-1761321234257.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 15:54:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1660547#M64558</guid>
      <dc:creator>Teresa_Blader</dc:creator>
      <dc:date>2025-10-24T15:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Web Designer Constraint regular expression fail to publish when using $ in regex</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1689085#M65587</link>
      <description>&lt;P&gt;A work around that works for me is to use a negative lookahead &lt;STRONG&gt;&lt;EM&gt;(?!...)&lt;/EM&gt;&lt;/STRONG&gt; . e.g. basic phone number regex:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;^\d{3}-\d{3}-\d{4}(?![\w ])&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;(?![\w ])&lt;/STRONG&gt; = Not followed by a-z, A-Z, 0-9, or space character.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; That's not a comprehensive list of all characters, just basic of what people might type in. You could add more restrictions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-03-06 121828.png" style="width: 225px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149444iD9E6AB1927F3E19F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-03-06 121828.png" alt="Screenshot 2026-03-06 121828.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 20:23:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/web-designer-constraint-regular-expression-fail-to/m-p/1689085#M65587</guid>
      <dc:creator>cjms</dc:creator>
      <dc:date>2026-03-06T20:23:03Z</dc:date>
    </item>
  </channel>
</rss>

