I\'m trying to figure out a way to remove all text in a string before match in Regex. I\'m coding this in C#.
For example, if the string is \"hello, test matching\
You can use positive lookahead to match a string but not capture it:
(?=test)
So you want to capture the stuff before the last occurrence of test:
^.*(?=test)
If you want to make it so that it is the first occurrence of test, use lazy matching:
^.*?(?=test)