cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Regular expression Help- I need to remove i:0#.w|

Jump to solution

I need to remove: i:0#.w| from i:0#.w|federated\l035269. I have tried to figure it out on my own but it is not panning out. I want my result to be federate[The employees ID number retrieved from the people picker field]

Reply
7 Replies
Highlighted
Automation Master
Automation Master

Re: Regular expression Help- I need to remove i:0#.w|

Jump to solution

Is this forms or workflow question?

In the forms, you can create a calculated field with something like this:


subString(AccountID,7,length(AccountID))

where AccounID = i:0#.w|federated\l035269

Reply
Highlighted
Automation Master
Automation Master

Re: Regular expression Help- I need to remove i:0#.w|

Jump to solution

replace() runtime function supports regular expressions.

so if federated domain name varies in  length, I think it's better to use that capability.

I'm not sure from the question whether format federated[The employees ID] is strictly required or not, but if so something like this could work

replace(AccounID,"i:0#.w\\|(\\w+)\\\\(\\w+)","$1[$2]")

just be carefull about usage of backslashes!

View solution in original post

Reply
Highlighted
Not applicable

Re: Regular expression Help- I need to remove i:0#.w|

Jump to solution

Hi Marian,

I'm sorry! You created it exactly how I explained it, but I explained it incorrectly. I still need "federated\" so I should have said my result should be "federated\91035269"

Your regex is perfect though because now I have a good foundation to teach myself regex. I will try to customize it myself. If I fail I will reach out again.

Sorry for that and thank you!

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Regular expression Help- I need to remove i:0#.w|

Jump to solution

Is this for LDAP purposes? I have been using a regular expression to remove the other detail around the network ID. For me this is nice as I can save as a snippet. I am sure this isn't the most efficient solution out there but it works for great.

1) Take ID, remove domain, save as variable A,

2) take variable A, replace preceding text with nothing, save as variable B,

3) use variable B for LDAP.

Reply
Highlighted
Nintex Newbie

Re: Regular expression Help- I need to remove i:0#.w|

Jump to solution

hello, 

i had the same issue and i just used the Build string action in the workflow and used :

fn-Replace( i:0#.w| from i:0#.w|federated\l035269,i:0#.w|,)

or you just insert the refrence of the  i:0#.w| from i:0#.w|federated\l035269 instead of the actual string.

Regards,

adriana

Reply
Highlighted
Nintex Employee
Nintex Employee

Re: Regular expression Help- I need to remove i:0#.w|

Jump to solution

Yet another way to remove the token is by using a Regular Expression action with the folowing settings:

  • Pattern = i:0#.w[|]
  • Operation = Replace text
  • Replacement text = Leave field blank
  • Input text = Your Employee account data
  • Store result in = Your variable

The result should be "federated\l035269".

Reply
Highlighted
Automation Master
Automation Master

Re: Regular expression Help- I need to remove i:0#.w|

Jump to solution

Hi Jacob Nye,

I hope one of these solution resolve your issue. Could you please mark it as correct answer to help others on the community.

Reply