Skip to main content
Nintex Community Menu Bar
Solved

Extract a word from comma separated combination.

  • August 10, 2023
  • 5 replies
  • 562 views
  • Translate

Forum|alt.badge.img+3

I have a user's forename and surname in the combination ‘Surname, Forename’ and I’d like to:

  1. Reverse this combination to ‘Forename Surname’ while removing the comma.
  2. Extract just the Forename.

I’ve tried some regular expressions found in searching online but these either return an empty value or ‘false’. I have no previous experience in regular expressions. 

Any ideas?

Thank you. 

Best answer by feckinirish

No, though I’ve found an internal workaround.

View original
Did this topic help you find an answer to your question?

5 replies

Forum|alt.badge.img+6
  • Nintex Employee
  • 29 replies
  • August 10, 2023

Hello there.

I suggest you first try using split with the comma as delimiter (so don’t remove it) and save first / lastname as separate variables. you can set the comma as a delimiter by making it a variable (“set” or use the ascii command 44). You can then create a new variable that uses these found variables ($firstname$ $lastname$ in any order you set them in your new variable. Use a dollarsign ($) to select variables that were previously created - look for a grey thunderbolt in the advanced command screen.

Blue thunderbolt means: you can create a new variable (no need for dollar) or select one that was previously created).

Should you want to play with regular expressions:

Online help:

https://regex101.com/

Nintex RPA lets you test you regex inside the advanced command (e.g. find) and you can run it on a variable

Good luck. 

Translate

MillaZ
Nintex Employee
Forum|alt.badge.img+21
  • Nintex Employee
  • 671 replies
  • August 14, 2023

Hi @feckinirish 
Did this response help solve your question? 

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • 6 replies
  • August 15, 2023
gobitz wrote:

Hello there.

I suggest you first try using split with the comma as delimiter (so don’t remove it) and save first / lastname as separate variables. you can set the comma as a delimiter by making it a variable (“set” or use the ascii command 44). You can then create a new variable that uses these found variables ($firstname$ $lastname$ in any order you set them in your new variable. Use a dollarsign ($) to select variables that were previously created - look for a grey thunderbolt in the advanced command screen.

Blue thunderbolt means: you can create a new variable (no need for dollar) or select one that was previously created).

Should you want to play with regular expressions:

Online help:

https://regex101.com/

Nintex RPA lets you test you regex inside the advanced command (e.g. find) and you can run it on a variable

Good luck. 

 

TBH Gobitz I didn’t understand the recommended process. What I did is outlined in the images below with the results.

Step 1

 

Log to instance

 

Workflow test

I tried ‘^[^,]*,([^,]+)’  (Thanks Chat GPT) which returned an empty first variable when using the SPLIT operation and the full input text when using the EXTRACT operation. 

Translate

MillaZ
Nintex Employee
Forum|alt.badge.img+21
  • Nintex Employee
  • 671 replies
  • August 28, 2023

Hi @feckinirish 
Is this question now resolved? 

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • 6 replies
  • Answer
  • August 28, 2023

No, though I’ve found an internal workaround.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings