<?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 function syntax in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/regex-function-syntax/m-p/878007#M29776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works a charm. Thanks very much Stephen!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Nov 2018 20:05:18 GMT</pubDate>
    <dc:creator>Schalkvan_Lill1</dc:creator>
    <dc:date>2018-11-06T20:05:18Z</dc:date>
    <item>
      <title>Regex function syntax</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/regex-function-syntax/m-p/878005#M29774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;I'm having some syntax issues with the regex function&amp;nbsp;added to the constraints field. If anyone can show me where I'm going wrong, that'll be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some special characters in a text field that I don't want to allow. If the user populates the text field with one or more of these characters, I want the validation to fail with an error message. The special characters I do NOT allow are:&amp;nbsp;" or ` or &amp;gt; or &amp;lt; or ; or \.&lt;/P&gt;&lt;P&gt;I tried the following (and various iterations of it);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regex(.,'([^&amp;lt;&amp;gt;";])')&lt;/P&gt;&lt;P&gt;but once I add the ' or the \, it fails to refresh the survey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regex(.,'(^[a-zA-Z0-9,*!£%^&amp;amp;)(+=@:#~/?. ]+$)')&lt;/P&gt;&lt;P&gt;where I add all the characters I want to allow, but this fails to refresh when I add { or } or [ or ].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Schalk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 09:20:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/regex-function-syntax/m-p/878005#M29774</guid>
      <dc:creator>Schalkvan_Lill1</dc:creator>
      <dc:date>2018-11-06T09:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Regex function syntax</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/regex-function-syntax/m-p/878006#M29775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason why it won't work with &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;\&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;'&lt;/SPAN&gt; is because &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;\&lt;/SPAN&gt; is used to escape characters using regex, and &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;'&lt;/SPAN&gt; is used to enclose the string.&lt;/P&gt;&lt;P&gt;I got this to work by escaping the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;\&lt;/SPAN&gt;, then creating a separate string and substituting it into the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used a hidden field named "characters" and set the default to the string I want to use:&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;^[^&amp;lt;&amp;gt;";\\']+$&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then in the constraint field for the input: &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;regex(.,${characters})&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 19:48:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/regex-function-syntax/m-p/878006#M29775</guid>
      <dc:creator>StephenM</dc:creator>
      <dc:date>2018-11-06T19:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regex function syntax</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/regex-function-syntax/m-p/878007#M29776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works a charm. Thanks very much Stephen!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 20:05:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/regex-function-syntax/m-p/878007#M29776</guid>
      <dc:creator>Schalkvan_Lill1</dc:creator>
      <dc:date>2018-11-06T20:05:18Z</dc:date>
    </item>
  </channel>
</rss>

