Reputation: 441
given
System Volume Information|28-May-15 3:16:25 AM|06-Aug-15 9:25:59 AM|5|
I need to get 2nd date of between | |
occurrence which is |06-Aug-15 9:25:59 AM|
. I am able to get the first and the last |5| with the regex below:
(?<=\|)(.*?)(?=\|) //First Date
(?<=\|)(.?)(?=\|) //Last occurrence|5|
Regex: https://regex101.com/r/aB1sC2/2
Upvotes: 2
Views: 24
Reputation: 785128
You can use this regex:
(?:[^|]+\|){2}([^|]+)
And grab captured group #1
Upvotes: 2