[mapserver-users] Limits on CLASS EXPRESSIONS for regular expressions

Stephen Woodbridge woodbri at swoodbridge.com
Tue Sep 20 21:29:49 PDT 2011


Does anyone know if/what restrictions we have on regular expressions 
within mapserver. I have a perl regular expression that matches 44 of 
120 counties in Kentucky:

EXPRESSION 
/(?-xism:(?i:(?=[abcfghjlmnorstw])(?:b(?:o(?:y(?:d|le)|urbon)|u(?:llitt|tler)|(?:arr|rack)en)|c(?:a(?:rter|sey)|(?:hristia|rittende)n|lark)|f(?:ayette|leming|ulton)|h(?:a(?:ncock|rt)|enderson)|l(?:e(?:tcher|wis)|(?:incol|oga|yo)n)|m(?:a(?:di)?son|e(?:rcer|tcalfe)|o(?:ntgomery|rgan)|ccracken|uhlenberg)|s(?:helby|impson|pencer)|t(?:aylor|odd)|w(?:ayne|oodford)|adair|grant|johnson|nicholas|oldham|russell)))/

This has been optimized and uses some embedded modifiers. This works 
fine in Perl but does not match anything in mapserver.

Any thoughts on how to modify this to work with mapserver. While this 
looks very convoluted, it is generated from a list of words and is high 
efficient when matching.

Thoughts?

-Steve W

PS: Using 5.6.x at the moment.



More information about the MapServer-users mailing list