For example...if I have a sentence as below as input:.
The details you entered is same as already given for MISS XXX. Kindly change the details for MISS YYY.
my expected output should be like
The details you entered is same as already given for.Kindly change the details for.
Can someone kindly help me on this.?
You can use multiple capture groups. So you can use something like:
(The details you entered is same as already given for )[A-Z]+\ [A-Z]+(\. Kindly change the details for )[A-Z]+\ [A-Z]+\.
And that will capture what you need, leaving out the stuff in capital letters.
Let me know how that goes.
Thanks for ur reply.
Actually I have set the BT to capture N number of errors.
I have mentioned only one of those errors above.So if I specifically write a regex for that error alone..the other errors are not being captured.
I need a generic regex which will capture all the errors and in case of the above error it should not consider the name part (ie MISS XXX ,etc)and the name may be longer than 2 words also.
Can you help me on this?
Hi @Srimathi S.
Can you please attach some samples for the errors/exceptions so that I can have a clear picture as what possible conditions will match with the errors while designing the regex.
Cause designing regex without knowing the possible senarios we dealing with is going to be tricky.
Thanks and Regards,
Hi @Radu S, @Rishabh Y.
I am attaching the screenshot of my BT output.
It is a user action based BT.
The scenario is I am capturing all the errors in a certain application.one of those errors have name of the customer mentioned in it.Due to this I am getting seperate entries for same error. I want that particular error to be grouped. I can see that only the name is different..the other parts are same and that the names are in capital letters. So I wanted a common regex which would accept all errors but should group this particular with name together.test.png
Hi, Try this:
(The details you entered is same as already given for).\*?(Kindly change the details for).\*?|.\*?(Unknown Error).\*|(There is a problem with the).\*?(have entered\. Please verify this and resubmit your details\.)