E.g. my project is named XXXX_YY_PRZZZ. Is there a way for me to get only the ZZZ part for my label field? Maybe with @project_basename or some variables like that?

  • Welcome to Geographic Information Systems! Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works
    – Ian Turton
    Apr 28, 2021 at 15:05
  • 2
    Hint look at replace under string expressions
    – Ian Turton
    Apr 28, 2021 at 15:05

2 Answers 2


Use this expression:

substr( @project_basename, strpos( @project_basename, '_PR' ) + 3 )

I assume string _PR exists in the project name.

  • Thanks! Yes, it does.
    – Nican
    Apr 28, 2021 at 15:19
  • @KadirŞahbaz okay, thanks for the reminder!
    – Nican
    Apr 28, 2021 at 15:30

could be an option

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.