1

I'm trying to remove the date / time stamp from text in the following format:

Randomtext - randomtext                             9 Aug 5:55am
2nd line of random text - 2nd randomtext            15 Aug 12:20am
More random text - some more text                   15 Aug 3:37pm

I'm having trouble with the date / time lengths being inconsistent due to the lack of leading zeros.

1 Answer 1

1

Try \b\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Sept|Oct|Nov|Dec) \d{1,2}:\d\d(am|pm)\bwith the regular expression find/replace - this should match the timestamps as presented in the example. This will look for one or two digits for the day of the month and the hour, which will allow for both 09 and 9 formats.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .