<div>Thanks Steve. </div><div><br></div>Tried the following regular expression <div><br></div><div>"[-+]?[0-9]*\.?[0-9]+".</div><div><br></div><div>For which the internal server error is coming from Apache. No error logged in mapserver log. <h1>
"Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.<span class="Apple-style-span" style="font-size: 26px; font-weight: bold; ">"</span></p><p><br></p><br><div class="gmail_quote">On Tue, Nov 15, 2011 at 8:37 PM, Lime, Steve D (DNR) <span dir="ltr"><<a href="mailto:Steve.Lime@state.mn.us">Steve.Lime@state.mn.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">See
<a href="http://www.regular-expressions.info/floatingpoint.html" target="_blank">http://www.regular-expressions.info/floatingpoint.html</a> for some good examples.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Steve<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Prabu Raja<br>
<b>Sent:</b> Tuesday, November 15, 2011 4:29 AM<br>
<b>To:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> [mapserver-users] Problem with Variable Substitution for EXPRESSION<u></u><u></u></span></p>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I need to compare one attribute from database table in "EXPRESSION" (under "LAYER") with six different values passed as Variable Substitution for coloring the layer.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I did added validation for those variables in the map file, but for some reason I am getting the below error.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><b>msValidateParameter(): Regular expression error. Parameter pattern validation failed.</b><u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><b>msEvalRegex(): Regular expression error. String failed expression test.</b><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><b>msValidateParameter(): Regular expression error. Parameter pattern validation failed.</b><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Could anyone help me with where I am wrong? Below is the map file content for this layer. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">All the six variables would be numbers (may be a decimal number), Is my regular expression correct? <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">WEB<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> VALIDATION<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> value_one "^[\d+(\.\d)]*$"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> value_two "^[\d+(\.\d)]*$"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> value_three "[^\d+(\.\d)]*$"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> value_four "[^\d+(\.\d)]*$"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> value_five "[^\d+(\.\d)]*$"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> value_six "[^\d+(\.\d)]*$"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">END<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">LAYER <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> NAME "state" <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> TYPE polygon<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> STATUS ON <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> CONNECTIONTYPE POSTGIS<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> CONNECTION "user=postgres password=****** dbname=shpdb host=localhost port=5432"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> DATA "the_geom FROM (SELECT gid, the_geom, totpop1 FROM state_shape) AS SUBQUERY using unique gid"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> PROCESSING "CLOSE_CONNECTION=DEFER"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> CLASSITEM "totpop1"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> OPACITY 100<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> CLASS <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> EXPRESSION ([TOTPOP1] >= %value_one% AND [TOTPOP1] < %value_two%)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> STYLE <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">COLOR 255 108 118<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">OUTLINECOLOR 255 255 255<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> CLASS<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> EXPRESSION ([TOTPOP1] >= %value_two% AND [TOTPOP1] < %value_three%)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> STYLE <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">COLOR 254 189 75<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">OUTLINECOLOR 255 255 255<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> CLASS <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> EXPRESSION ([TOTPOP1] >= %value_three% AND [TOTPOP1] < %value_four%)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> STYLE <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">COLOR 254 247 46 <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">OUTLINECOLOR 255 255 255<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> CLASS <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> EXPRESSION ([TOTPOP1] >= %value_four% AND [TOTPOP1] < %value_five%)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> STYLE <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">COLOR 39 251 114<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">OUTLINECOLOR 255 255 255<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> CLASS <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> EXPRESSION ([TOTPOP1] >= %value_five% AND [TOTPOP1] <= %value_six%)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> STYLE <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">COLOR 108 111 205<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">OUTLINECOLOR 255 255 255<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> END<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">END<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">-- <br>
Regards,<br>
Prabu Raja<u></u><u></u></p>
</div>
</div></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>Prabu Raja<br><br>
</div>