Extract certain string between "|"

Hi @Ionut_Frincu

I hope you are well.

Sounds like you have two posts in one here.

  1. How do I extract this text (Regex)
  2. How can I write the result to column B (datatables)

Sure you can blend into one but you may not get a result as fast as two separate posts.

As for question 1: Forum members can provide you with a strong Regex pattern in minutes/hours on this forum but require strong information to make that pattern.

Samples were provided but sounds like they are not full complete samples. If you know there are various versions of Weight/Package Weight/Total Package Weight etc - then insert those into your sample.

Output, please include this in your original post. Highlight the text in bold within the sample, write out how many results there should be etc.

Pattern/information, what is consistent is a good start and you told us about the “|” symbol and eventually that it needs to contain “Weight”. What about the colon symbol “:”or the units “LB” and the spaces. Literally the more information the better. More information = More Reliable Regex pattern.

These tips will deliver you good results :wink:

I have made a regex pattern for you which should suit your needs from the pieces of information I can gather. The rest was assumptions (and they don’t always turn out :sweat_smile:).

You can preview/test the Regex Pattern here. :

As for Question 2, I would start looking here and make a second post.

Hopefully this helps you :blush: