RegEx to help me find :line in the stacktrace
\W*(:line)\W*
I am writing code to help highlight the file and line number when something crashes in HTML
Example Stacktrace
Microsoft.Data.SqlClient.SqlException (0x80131904): The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) at Microsoft.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) at Microsoft.Data.SqlClient.SqlDataReader.<>c__DisplayClass196_0.<ReadAsync>b__1(Task t) at Microsoft.Data.SqlClient.SqlDataReader.InvokeRetryable[T](Func`2 moreFunc, TaskCompletionSource`1 source, IDisposable objectToDispose) --- End of stack trace from previous location where exception was thrown --- at ExampleProjectSystem.API.Services.ReportRepository.SearchCustomerByAdvanceFilters(TableBaseDto filter, String ReportName) in E:\SharedProjects\ExampleProjectAPI\Services\ReportRepository.cs:line 445
I'd only want ReportRepository.cs:line 445 so I can perform change the font/color/css in the HTML when viewing the crash.
