[Qgis-user] How to split string values with separator

Piotr Kania p.kania at op.pl
Wed Feb 3 08:46:52 PST 2016


Hi!

I try to find "Qgis way" to achieve the same as those  arcmap field's 
calculator command: SPLIT( [FieldName],",")(0) - in that case "," is a 
separator, so from a string 'dog,cat,spider' I will get 'dog' - as it is 
the first element, counted as "zero" - 'cat' is number 1, 'spider' 
number 2 etc. So:

SPLIT( [FieldName],",")(1)     ->     'cat'
SPLIT( [FieldName],",")(2)     ->     'spider'

Thanks for any response




More information about the Qgis-user mailing list