1

Can anyone provide the regex for extracting the data between the 2nd and the 3rd "|"

For example, for the below data

2016 Annual | 1.1 - 12.31 | COH (NP) | #21485

The result should be COH (NP)

1

1 Answer 1

2

A regex is overkill for this. Just split on "|" and take the desired component:

Sub test() Dim S As String S = "2016 Annual | 1.1 - 12.31 | COH (NP) | #21485" Debug.Print Split(S, "|")(2) 'prints COH (NP) End Sub 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.