Are you going to use this as a json string? You might consider the below
example:

node {
    def abc = '''
    {"ttd1": [{:php2val2"}:{"Version" : "02.02.42"}
    '''

    echo abc
}

On Tue, Jan 29, 2019 at 8:47 AM Panneer <panne...@gmail.com> wrote:

> Hi All,
>
> I want to insert  a character in a string at a certain position in Groovy
> pipeline. e.g is here below
>
> sam1 = {"ttd1": [{:php2val2"}:{"Version" : "02.02.42"}
>
> i want to convert the above data into below format for curl comman.
>
> sam2 = {\"ttd1\": [{\"php2val2\"}:{\"Version"\ : \"02.02.42\"}
>
> Please guide me on this.. I tried with replaceAll but not working.
>
> Regards
> Panneer
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/3558f89a-c446-4a3a-a45c-583f6012feb2%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/3558f89a-c446-4a3a-a45c-583f6012feb2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
https://github.com/LinuxSuRen

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAMM7nTHh%2B8_mYH66LyHzNnDXBXV1_uGsw-p-TLfO81j7OXEaYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to