Necesita una expresión regular perfecta [cerrada]

I need to extract information form a text using regex for statements like bellow

#1. 02/14/2013 05:21 pm - Safee Safeeul Bashir
- Status changed from New to In Progress

#2. 02/14/2013 10:43 pm - Safee Safeeul Bashir
- Status changed from In Progress to Resolved
- CL set to 1203474

#3. 08/16/2013 02:30 am - Mondal Amit Kumar
Task was automatically close beacuse last update was more than two months and the issue passed

From here I want to extract the date and time where the status is changed to resolve. For example for this one the date with #2 **02/14/2013 10:43 pm**

preguntado el 27 de noviembre de 13 a las 06:11

I tried to extract 02/14/2013 10:43 pm based on String Resolved. Please check there is Resolved in second para. -

2 Respuestas

Qué tal esto:


See it on RegExr

respondido 27 nov., 13:07

Thanks... Its working - safeeul

La expresión regular puede ser


respondido 27 nov., 13:06

It is maching the string. But Need to extract the date from here. And moreover There is three dates. it is matching all the date. I need to match only the resolve date. please check the context again. - safeeul

I don't know what the language do you use so can't suggest flag. for example if you use Perl it will be my @dates = $text =~ /(myregex)/gi - Cubierta

Its for VBA Excel Macro - safeeul

Sorry, I don't know this language. But to capture something from text using regexp you should use () brackets so use (\d{2}/\d{2}/\d{4}\s\d{2}:\d{2}\s[pa]m) o conseguir Value of the matching. I am pretty sure that VBA can do it. - Cubierta

I almost got this. I there is a line break. I need to capture this. - safeeul

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.