I have a huge sewer network with pipe information, labelled for example as "pvc400" (where material=Pvc and diameter=400). Is it possible to split up the information into text and numbers only, so that i create two new columns, 1 with information about material "pvc" and one with the diameter "400"?
1 Answer
To calculate that fields you can use regex function regexp_substr()
. In the field calculator create new field with expressions:
For retrieving text characters (non-digits)
regexp_substr("your_field",'(\\D+)')
This takes from "pvc400" only "pvc"
For retrieving numbers (digits) with
regexp_substr("your_field",'(\\d+)')
This takes from "pvc400" only "400"