I'm trying to parse a fragment of a stacktrace, which looks pretty much like this:
at Test.Test1() in C:\Projects\Project\Test.cs:line 37
Using a regex like this works as intended:
at (.*?) in (.*?):line (\d*)
This matches
- Test.Test1()
- C:\Projects\Project\Test.cs
- 37
This regex is hardcoded to an english stacktrace, so there are obviously no matches if the stacktrace is in another language, such as swedish:
vid Test.Test1() i C:\Projects\Project\Test.cs:rad 37
To make the matching more language neutral I tried this regex out:
(.*?) .*? (.*?) (\d*)
This matches
- Test.Test1()
- C:\Projects\Project\Test.cs:line
- 37
The question is how would I match the file path without the trailing :line?