cancel
Showing results for 
Search instead for 
Did you mean: 
raghavat
Nintex Newbie

Split string help

Jump to solution

Hi ,

 Building a string from two reqular expression collections .

collection1 : A;B;C  (last ; elimated using buildstring)

collection2 :Apple;Banana;Carrot

Building string

The string looks like

A;B;C|Apple,Banana,Carrot

I need to split  A and Apple

                       B and Banana

                        C and Carrot

 

How it is possible through regular expression or any other way ?

Thanks in Advance

 

Labels: (1)
0 Kudos
Reply
4 Replies
Nintex Employee
Nintex Employee

Re: Split string help

Jump to solution
Hi,
To help resolve this please advise what sort of output are you looking for? What would lit look like? For example would it be A;Apple,B;Banana,C;Carrot
Or would it be separate string pairs etc?
0 Kudos
Reply
raghavat
Nintex Newbie

Re: Split string help

Jump to solution

Hi simon ,,thanks for your response .

 

Actually what I need here is  , I have a below Json string ...

 

{
  "result": [
    {
      "website": "Google",
      "url": "https://www.google.com"
     
    },
    {
      "website": "Nintex",
      "url": "https://www.nintex.com"
    
    },
    {
      "website": "Microsoft",
      "url": "https://www.microsoft.com"
     
    }
  ]
}

 

Using reqular express pattern I am able to get website values and stored them into a Collection variable called collWeb . Collection is  Google;Nintex;Microsoft

 

second regular expression pattern I am to get all URL values and stored then into another collection variable called collURL  . Collection is https://www.google.com;https://www.nintex.com;https://www.microsoft.com

 

Using Build string I am concating two above variables with | sepreated .So the whole string will be

 

Google;Nintex;Microsoft|https://www.google.com;https://www.nintex.com;https://www.microsoft.com

 

I need out put like

Google and https://www.google.com

Nintex and https://www.nintex.com

Microsoft and https://www.microsoft.com

 

So that I will form a link ...

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Split string help

Jump to solution

Hi,

I have attached a workflow which outputs what you want in one long string separated by a semi colon.

Google and https://www.google.com;Nintex and https://www.nintex.com;Microsoft and https://www.microsoft.com;

 

I created the collections at the start of the workflow to simulate what you get when you do your query.  I dont recommend joing the two collections as you have but instead just grab what you need out of them.

 

If I miss understood what you were after let me know and I can have another go at it.

 

View solution in original post

0 Kudos
Reply
Highlighted
raghavat
Nintex Newbie

Re: Split string help

Jump to solution
Thanks a lot Simon . Worked perfectly ...
0 Kudos
Reply