Skip to main content
Nintex Community Menu Bar

Extract string left of @ character

  • May 29, 2015 1:19 PM UTC
  • 6 replies
  • 38 views
  • Translate All

Forum|alt.badge.img+2

Hi,

For a given email address, e.g. john.smith1@hello.co.uk, how could I extract the text before the "@" and store it in a variable? Which, in this case would be john.smith1

Usually I would use the 'Left' function but that doesn't seem to be present in Nintex.

Any ideas? happy.png

Thanks

6 replies

Forum|alt.badge.img+16
  • May 29, 2015 2:23 PM UTC

You can do it following these steps:

-Create a variable named myResult (string type)

-Create a variable named myResults (collection type)

-Create a variable named myIndex (number type-default 0)

-Add the action named "Regular Expression"

82558_pastedImage_1.png

-Add the action named "Collection operation" 82557_pastedImage_0.png

You will get the result in "myResult"

Translate

Forum|alt.badge.img+2
  • Author
  • May 29, 2015 3:22 PM UTC

Thanks Fernando happy.png

Translate

Forum|alt.badge.img+4
  • Apr 3, 2016 1:05 AM UTC

Hi Fernando Hunth​

Is there a way to do this for multiple splits.. example..

I want to extract text in a date field "3/04/2016 12:00 am." my desired result is 3042016

Please let me know if this is possible

Thanks,

Kimberley

Translate

Forum|alt.badge.img+16
  • Apr 3, 2016 2:22 AM UTC

You could use the fn-Replace function

fn-Replace (     fn-Replace ( {yourVar}, "12:00 am.", "" )   , "/" , "" )

Translate

Forum|alt.badge.img+1
  • Jun 20, 2019 5:02 PM UTC

Is there a reg ex that doesn't require the use of a collection operation to get text before a specific character?

Translate

Forum|alt.badge.img+3
  • Rookie
  • Feb 12, 2020 10:48 AM UTC

HI there, 

 

any chance i can split by -

Filename: P101S-AS-6801-18010.01 to be used  and copy the details as metadata into columns. the first 5 characters are location, AS will be city code, 6801 will be door no and 18010 will be unique code. 

 

Thanks in advance.  

Translate