I have for example this string:
"DLH3029 (LUFTHANSA THREE ZERO TWO NINER)"

that should become:
'LUFTHANSA THREE ZERO TWO NINER'

so I use this regex:
Qt Code:
  1. echo "DLH3029 (LUFTHANSA THREE ZERO TWO NINER)" | sed "s/[^(]*(\([^)]*\)).*/'\1'/"
To copy to clipboard, switch view to plain text mode 

How can now use it in a Qt program ?

I've tried but I cannot find a way to make it work.