1
"Exception_type"필드에 예외를로드하여 응용 프로그램에 표시하려고합니다. 나는 정규 표현식을 가지고 있지만 나에게 멀티 패러 매치 그룹을 주었다. 내가 필요한 것은 "Exception_type"필드에 대한 완전한 메시지이다. 도움이된다면 알려주기 바란다.정규식을 사용하여 전체 메시지를 추출 할 수 없습니다
는 정규식 :
이(?<Exception_type>[a-zA-Z]+.*[^,]*[^ ,][^,]*$)
메시지 :
2016-12-22 14:06:00.4563 System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:30030
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at Vinod.MyPos.MyProject.MySubProject.Vendor.Communicator.VendorSaleRequestHandler.<Send>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Vinod.MyPos.MyProject.MySubProject.Vendor.Communicator.VendorSaleRequestHandler.<Handle>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Vinod.MyPos.MyProject.MySubProject.Vendor.Communicator.VendorServiceCommunicator.<Send>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Vinod.MyPos.MyProject.MySubProject.Logging.LoggingMySubProjectChildMessageProcessor.<ProcessMessage>d__4.MoveNext() MySubProject ProcessMessage Exception : client token : [c7b9396d-b790-43f5-9561-f01c6dcdddce]
달성하고자하는 목표는 무엇입니까? 예상되는 결과는 무엇입니까? –
필드에서 시작부터 끝까지 (날짜 스탬프없이) 전체 메시지가 필요합니다. Exception_type – Vinod
메시지와 함께 예외 이름을 원하면 다음 정규 표현식을 사용하십시오 :'(\ w + \.) * \ w + Exception : ([a-zA-Z] + \ s ([a-zA-Z] + \)) *' – rafid059