You are viewing limited content. For full access, please sign in.

Question

Question

Problem with pattern matching

asked on October 7, 2021

I am have a problem with removing the underscore and replacing with a white space.

Example:  Attorney_Notice_Letter_123456-25698-01478

If I use \w+[a-z]

Result: Attorney_Notice_Letter

Could use some help

Thanks

John

0 0

Answer

SELECTED ANSWER
replied on October 7, 2021

Hi John,

 

Try "Token Calculator" with "SUBSTITUTE"

 

This will change all your "_" by "" (nothing).

2 0
replied on October 8, 2021

Olivier, I see that your substitute option removes the underscores successfully, but how could we get the underscores to be replaced with a space instead?

0 0
replied on October 10, 2021 Show version history

Hi Connie,

The Substitude replace old character by new character. In this exemple, it's replacing "_" by "". If you want to replace by space, just change the new character option => "_" by " ".

SUBSTITUTE(%(Token),"oldchar","newchar")

SUBSTITUTE(%(Token),"_","") (replace "_" by nothing)

SUBSTITUTE(%(Token),"_"," ") (replace "_" by space)

1 0
replied on October 11, 2021

Oh my gosh, thank you Olivier! I have been frustrated about the lack of this functionality for years and it's been hiding in Token Calculator this whole time.

0 0
replied on October 12, 2021

Pieter Nauta, you welcome ^^

0 0
replied on October 15, 2021

I made it work!  Thanks!

2 0

Replies

replied on October 7, 2021

Thanks you

0 0
replied on October 8, 2021

Thank You worked perfect

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.