Dear fellow developers:
I have a column in a table that resides in an Oracle database that is composed of text similar to the following:
Closing on Thursday, December 22, 2011 at 04:00 PM EST. Location....
Closing on Monday, December 26, 2011 at 05:00 PM EST. Location...
Closing on Wednesday, December 21, 2011 at 04:00 PM EST. Location...
What I need to do is create two regular expressions, one that parses the text, and selects ONLY the date (e.g. Thursday, December 22, 2011) from each row, and another regular expressions that captures ONLY the time (e.g. 04:00 PM EST).
Ideally, what I would like to do is create a stored procedure that:
1. Selects everything from this column
2. Parses the text such that it separates the date portion from this block of text
3. Parses the text such that it separates the time portion from this block of text
3. RE-INSERT this date portion in the SAME column it currently resides in , replacing the text that is there
4. INSERT the time portion into another column of the same table
The key here, is that I need to parse the text using regular expressions which I am not familiar with. What I can say, is that despite the variable length, the content of the strings in each row is consistent. Every row begins with, "Closing on...", and after the year, the word "at" appears before mentioning the time in the form "00:00 AM EST" followed be a period, with more text following. Once I have the regular expression(s), I will then be incorporating it within an Oracle stored procedure. I hope this question makes sense, and I will be more than happy to provide further clarification if necessary.
Thanks in advance to all who reply.