Hi Anth, you might have more luck on the users list (rather than the dev
list) or a jenkins list.
The only thing I'd guess is you need to escape one or both of the
backslashes but I don't know enough about how the jenkins integration is
done to comment much more than that.

Cheers, Paul.

On Wed, Mar 4, 2020 at 10:02 PM anth <amitabha...@gmail.com> wrote:

> I am using this below in a declarative groovy pipeline Jenkins template &
> it
> throws me error as unexpected token \
> can anybody guide please ? Intention is to match the word in
> sonar.projectKey & use it further. how to achieve this?
> please note that when I use freestyle jobs in same jenkins using this below
> it works fine.
>
> command -
> echo "${sonarcmd}" >> sonar.txt
> grep -Po 'sonar\.projectKey=\K[^ ]+' sonar.txt
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>

Reply via email to