I am fiddling with addresses, where I would like to remove the street number.
So far I found some solutions leading to explain how to get rid of the numbers but from the right side of the string:
Extract left part of field with regexp_substr after two specific charaters Removing string to the right of a character using QGIS Field Calculator? How to split string, removing digits keeping letters/words
as well as some options with replacing the parts of the string:
Replacing characters using an expression in QGIS How to extract part of string after '*', '~', '-' or '#' Replace using regular expression?
but I couldn't find either how to remove the number from the end of the string nor what is the definition of any number in QHIS expressions:
https://docs.qgis.org/2.8/en/docs/user_manual/working_with_vector/expression.html
I used these 2 codes but both didn't work as expected:
right ( "Address L1", length("Address L1")-regexp_match("Address L1" ,'(_S\\d+)')-2)
substr("Address L1",regexp_match("Address L1",'')+2)
because they take down just the first 2 characters some addresses are fine, other ones have additional space at the very beginning and others still keep some numbers. I need something, which would allow me to remove the stuff before the first space. Is it possible?
facility
instead ofrecycling facility
. You know how to check for numbers, so use this as your condition, and thenregexp_match()
for spaces if there are numbers in the address.