INPUT: garbage="stff",start1="allshortsofCharactersExceptDoubleQuotes",start2="*&^%$blahblah"
DESIRED RESULT: allshortsofCharactersExceptDoubleQuotes
*&^%$blahblah
Using c# .NET:
string myRegExString = @"(?<=start[0-9].).*(?="")"
Yeilds: allshortsofCharactersExceptDoubleQuotes",start2="*&^%$blahblah
Through testing I know that if I replaced .* with a set that had all the characters except double quotes I would get the desired result but that is a lot of work and I will get that wrong. Also using (?!"") or (?!="") before .* does not work either.
So how do I get the lookahead to stop on the first double quote it finds?
Correct Answers (as far as I tested) from the responses:
(?<=start\d+="")[^""]*(?="")
OR
(?<=start\d+="")[^""]+(?="")
OR this works too but is not quite what was asked for.
(?<=start\d+="")[^""]*
Thanks. I was so wrapped up in the lookahead aspect of this item.