Skip to main content
Nintex Community Menu Bar
Solved

How to replace a "pipe" in a regular expression ?

  • Feb 2, 2016 4:26 PM UTC
  • 6 replies
  • 962 views
  • Translate All

Forum|alt.badge.img+6

Hello,

 

As you can see in the screen, I used a regular expression to replace an expression like : i:0#.w|blablabla to blablabla

But when I execute my action the expression is : |blablabla

 

Problem :

When I used regular expression, this part "i:0#.w" is delete so it's OK but I don't know why the pipe "|" stay.

I try ASCII into the regular expression but it not work &#124

 

 

Do you have solution to fix it ?

Best answer by francois

Absolutely

Add backslash before the pipe to have the correct result.

remove_pipe.png

View original

6 replies

Forum|alt.badge.img+11
  • Scholar
  • Feb 2, 2016 4:58 PM UTC

Hi Theo,

A pipe "|" expression in regex tells the system that a match can be on either side of the |. To replace this character you may have to escape it.

I'm not a pro at regex but this is what i have seen in the past. See more details here: replacing pipe "|"

Translate

Forum|alt.badge.img+6
  • Nintex Partner
  • Answer
  • Feb 2, 2016 6:56 PM UTC

Absolutely

Add backslash before the pipe to have the correct result.

remove_pipe.png

Translate

Forum|alt.badge.img+6
  • Author
  • Feb 3, 2016 8:04 AM UTC

Thanks, I'm going to try and get back to you =)

Translate

Forum|alt.badge.img+6
  • Author
  • Feb 3, 2016 8:22 AM UTC

Thanks for your help ! It works well =)

KR

Theo

Translate

Forum|alt.badge.img+6
  • Author
  • Feb 10, 2016 6:08 PM UTC

Yes, sorry I forgot

Translate

Forum|alt.badge.img+4

Thank you very much.  I am now trying to do the same with a form variable in New Responsive and I cannot get this to work.  When I use 

  • Start is: i:0#.x|member|i999999@test.com
  • Variable setup is:  replace(FORM.FieldName),"i:0#.x|member|","")
  • Result is:  ||i999999@test.com

 

Do you @francois  know how to remove the pipe in this case? When I try to use a backslash it disallows this in the variable setup.

 

Translate