1

How to split string (the last digits) in QGIS?

new street 25 = new street

old street 2 = old street

lower 26A = lower

lower new street 125 = lower new street

Jozefs and Elisabeths new gardens 147A = Jozefs and Elisabeths new gardens

Nedim
  • 21
  • 2
  • 3
    Why is this question being voted as off-topic due to no GIS component? I'm fairly certain the majority of questions which include the field-calculator tag do not contain any GIS components but are still valid questions. – Joseph Oct 12 '17 at 11:58

1 Answers1

2

Try with this expression in the field calculator :

regexp_replace( "fieldname", ' \\d.*$', '')

This will remove the last block of characters if it starts with a number.

ArMoraer
  • 5,649
  • 2
  • 26
  • 48