Skip to main content
Nintex Community Menu Bar

How to Retrieve x Number of Characters From Right Side Of String

  • Aug 18, 2017 1:41 PM UTC
  • 5 replies
  • 221 views
  • Translate All

Forum|alt.badge.img+5

Hi Gang

I've got a document approval workflow that grabs information from the workflow history list.  When it grabs the User information I get a string that I need to pull data from.  Here is an example of a string format that I'm working with that I get as the User.

i:0e.t|getaccess|z0008x5e

I need to programmatically find the last "|" in the string and then grab the substring after that "|" to the end of the string.  So what I programmatically need to pull out given this example would be "z0008x5e".

Can anyone help me with this?  I know there is a SubStr() and InStr() in Nintex but I think I need more to get what I need.

Best Regards,
Andy

5 replies

bamaeric
Nintex Partner
Forum|alt.badge.img+15
  • Nintex Partner
  • Aug 18, 2017 2:26 PM UTC

Hi Andy,

Try the following regular expression:  [^|]*$

Translate

Forum|alt.badge.img+5
  • Author
  • Aug 18, 2017 2:38 PM UTC

Hi Eric

Thanks for the response!  I'm not sure how to use this.  Can you give me a full example?

Thanks

Andy

Translate

Forum|alt.badge.img+7

Hi Andy McVicker‌

Add a Regular Expression action into your workflow and configure like this:

This will save your result into a collection variable and you can then extract it using a collection operation described here:

‌

Hope this helps

‌ ‌ ‌‌

Translate

Forum|alt.badge.img+5
  • Author
  • Aug 18, 2017 2:54 PM UTC

Thanks Paul.  So is it putting just z0008x5e into the collection variable or is it putting

i:0e.t

getaccess

z0008x5e

into the collection variable?

Best Regards,

Andy

Translate

Forum|alt.badge.img+7

‌

Just z0008x5e

Then use the Get operation with an index of 0 and you will have your result

Translate