troubleshooting Question

RegEx in C# - grab all text between "_1" and "="

Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America asked on
.NET ProgrammingC#Regular Expressions
12 Comments1 Solution723 ViewsLast Modified:
Given this string:

blah blah blah
        FIELD=
    {
        FL_NAME=po_number_line_1
blah blah blah


and that I have the index of "_1"

I want to grab everything after the "=" (the "=" closest to the "_1" that precedes the "_1") up to and including the "_1", which in this case would result in:


po_number_line_1



but I do not know how long this part will be:

po_number_line

it could be shorter or longer than that.

There could be any number of characters before and after the snippet above.  But I don't think that will matter (just be aware of this)


Thank you for your fast solution given in C#, please.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros