<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Actually EXPRESSIONs can handle regex too:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>CLASSITEM ‘tag’<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>CLASS<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>   EXPRESSION /^TVOP2/<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>   …<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>END<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>This catches all tag’s that begin with the pattern TVOP2. You
might want to do a FILTER instead if this is the ONLY filter you need to apply.
You’d see a small performance boost if that were the case.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Steve<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<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;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>tommaso<br>
<b>Sent:</b> Tuesday, November 09, 2010 5:29 AM<br>
<b>To:</b> wildcolour<br>
<b>Cc:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [mapserver-users] RE: Real life sample of a Mapfile for shp
files on WMS<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Hi, for regular expression you need to set the parameters
FILTERITEM and FILTER. <br>
&gt;From the documentation (<a
href="http://mapserver.org/mapfile/expressions.html#regular-expression-comparison)">http://mapserver.org/mapfile/expressions.html#regular-expression-comparison</a>)<br>
<br>
LAYER<br>
&nbsp;&nbsp;&nbsp; NAME &quot;regexp-example&quot;<br>
&nbsp;&nbsp;&nbsp; FILTERITEM &quot;placename&quot;<br>
&nbsp;&nbsp;&nbsp; FILTER /hotel/ <o:p></o:p></p>

<pre><o:p>&nbsp;</o:p></pre><pre>&nbsp;&nbsp;&nbsp; ...<o:p></o:p></pre><pre>END<o:p></o:p></pre>

<p class=MsoNormal><br>
I think, the parameter EXPRESSION does not allow regular expression comparison.<br>
<br>
Cheers,<br>
Tommaso <br>
<br>
<br>
On Mon, 2010-11-08 at 15:29 -0800, wildcolour wrote: <o:p></o:p></p>

<pre><o:p>&nbsp;</o:p></pre><pre>Thanks, this looks great.<o:p></o:p></pre><pre>I will try it tonight, but I think is looking just right.<o:p></o:p></pre><pre>One more related question.  The column we are using is called 'Tag'<o:p></o:p></pre><pre>and the seemed to have grouped the 'class' and the 'title' in the one<o:p></o:p></pre><pre>column.  For example all secondary roads have the tag<o:p></o:p></pre><pre>&quot;TVOP2&quot;<o:p></o:p></pre><pre>but roads with the name 'smith st' will look like this<o:p></o:p></pre><pre>&quot;TVOP2,SMITH ST&quot;<o:p></o:p></pre><pre>So my  question is in the expression can I do a 'is like' query??  I am<o:p></o:p></pre><pre>guessing somthing like this<o:p></o:p></pre><pre>EXPRESSION 'TVOP2%'<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Thanks for the great support<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Matt  :)<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre>

<p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>