I want to create a new field in my attribute table. My goal: returning all digits between the / and _ characters of the field named "location" by applying the next expression:
regexp_substr( "Text", '/(\\d*)\_' )
based on this working example: Obtaining specific part of string from field in QGIS attribute table?
However, the expression does not give the desired result in my case:
Does anyone know any way to modify/accommodate the expression?
Best Answer
Since the number of characters is same, you can use
substr()
function on a new field as in the following expression:In the above example I used
Path
instead ofLocation