Use Regex to get left of match

I’m still learning how to right Regular expressions. The expression i have (below) works for finding a specific string and pulling in everything to the right of that string. I need to pull in everything to the left of a that string after nine characters (see highlight in image below). how do i re-write that? I need the date at the beginning of the line

System.Text.RegularExpressions.Regex.Match(PDFText,“(?<=See Below).+”).ToString


Hi @atarantino,

If you get the match as a variable, you can then split by that:

Result = YourString.Split({RegexMatch},StringSplitOptions.None).First

Edit: Refer to this post for extracting your regex matches, this should help:

I appreciate the reply. i was actually able to do regex match for date and pulled in the index for the date i needed.

1 Like

Hi @atarantino,

That makes sense, glad you got a solution!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.