[Qgis-user] regexp_match stopped working after update

Nyall Dawson nyall.dawson at gmail.com
Sun Dec 8 14:39:16 PST 2019


On Sun, 8 Dec 2019 at 20:17, emmexx <emmexx at tiscalinet.it> wrote:
>
> I used for a long time the following expression to select features on a
> layer:
>
> regexp_match( "myField" ,'.*\\b(2|9)\\b.*')
>
> myField values are numbers separated by a comma (e.g. 3,43,87.)

This works ok for me (returns 1):

regexp_match('3,43,2,87' ,'.*\\b(2|9)\\b.*')

as does

regexp_match('3,43,9, 87' ,'.*\\b(2|9)\\b.*')

Can you provide detailed steps to reproduce?

Nyall


>
> I used it successfully last week too.
>
> 2 or 3 days ago I updated qgis to 3.10.0 and that expression stopped
> working.
>
> Other expressions work as expected:
>
> regexp_match( "myField" ,'43')
>
> The example expression inside the expression editor has a different
> result yet:
>
> regexp_match('QGIS ROCKS', '\\sROCKS') gives me 5 while the online help
> says it should give 4.

Good catch, it's just a typo in the help.

Nyall

>
> Any suggestion?
>
> Thank you
>         maxx
>
> p.s. I use qgis on Archlinux.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


More information about the Qgis-user mailing list