<p dir="ltr">We should indicate in the function help that strpos is regexp based. </p>
<div class="gmail_extra"><br><div class="gmail_quote">On Nov 7, 2016 6:23 PM, "Matthias Kuhn" <<a href="mailto:matthias@opengis.ch">matthias@opengis.ch</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
strpos is based on regexp, a '.' matches any character.<br>
To let the engine treat a . as such you need to prefix it with a<br>
double-backslash.<br>
<br>
strpos(to_string("area"), '\\.')<br>
<br>
Regards<br>
Matthias<br>
<br>
<br>
On 11/07/2016 12:07 PM, Elstermann, Mike wrote:<br>
> Hi,<br>
><br>
><br>
><br>
> “area” is a double-field with values e. g. 213.1234,  43215.3456, …<br>
><br>
><br>
><br>
> strpos("area",'.') gives only value 1 return :-(<br>
><br>
> strpos(to_string("area"),'.') gives only value 1 return  :-(<br>
><br>
><br>
><br>
> This error exits only by ‘.’, other search-strings e. g. ‘12’, ‘1’, …<br>
> work fine<br>
><br>
><br>
><br>
> Our workarround works fine.<br>
><br>
><br>
><br>
> strpos( replace( to_string( "area" ), '.', ',' ), ',' )<br>
><br>
><br>
><br>
> Is this a bug with ‘.’?<br>
><br>
><br>
><br>
> best regards, mikeE.<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Qgis-developer mailing list<br>
> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
><br>
______________________________<wbr>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></blockquote></div></div>