Forum Discussion

JeffPeterson1's avatar
JeffPeterson1
Qrew Captain
5 years ago

Pipelines and JIRA

I'm working with a JIRA pipeline and the fields from JIRA return a funky format that looks like this:

value:"{u'self': u'https://xxxxxxxxx.atlassian.net/rest/api/2/customFieldOption/23142', u'id': u'23142', u'value': u'NS4426-SAC-00001-MA-CHE'}"

What's the best way to manipulate this data so that I can extract just the part at the end:  NS4426-SAC-00001-MA-CHE?

Has anyone else run into this issue?


------------------------------
Jeff Peterson
------------------------------
  • Solved by using the 'Apply Regex' pipeline using this expression:

    ([A-Z,0-9]{1,3}-[0-9]{1,5}-[A-Z]{1,2}-[A-Z]{1,3})

    which results in this:  SAC-00001-MA-CHE   (exactly what I was needing)

    Hope this helps someone else.

    ------------------------------
    Jeff Peterson
    ------------------------------