Is there a way for Open Office to recognize and find unformatted dates? I have hundreds of pages of journal entries, each with a date and a heading. Nothing is formatted. If possible, I'd like to select all the dates and put them in italics (or whatever, this is an example). Dates are sometimes written like "Aug 4, 2007" or similar.
Obviously I can use "Find" to select every instance of "September" or "2010" and put them in italics, but that won't work with the numbers, given that numbers appear all over the place in my journal.
I'm not an Open Office Writer enthusiast, I'm just a guy with hundreds of pages of text. If you have advice, please keep in mind that I don't know a lot of the lingo that a "super user" might be used to.
[Solved] Find unformated dates in a document?
[Solved] Find unformated dates in a document?
Last edited by Kaze on Sun Nov 26, 2023 2:26 am, edited 1 time in total.
Apache Open Office 4.1.14. Windows 10
Re: Writer: Find unformated dates in a document?
With the Find dialog tick regular expressions. First search result details for Date formats are here but there may be better ones:
https://www.freecodecamp.org/news/regex ... ing-dates/
https://www.freecodecamp.org/news/regex ... ing-dates/
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Writer: Find unformated dates in a document?
For your example the following would work for all August dates with that pattern.
\d with any following digit
, and a comma and a space
\d{4} and any 4 digits
Edit: If you don't know about Character styles for Writer, look that up. You could create one for your dates and that would make changing them all at once to a different format easy.
Aug find AugAug \d, \d{4}
\d with any following digit
, and a comma and a space
\d{4} and any 4 digits
Edit: If you don't know about Character styles for Writer, look that up. You could create one for your dates and that would make changing them all at once to a different format easy.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Writer: Find unformated dates in a document?
To do a search for all the months at once with your pattern it would be
You should be able to make you own simple adaptation to find whatever format your dates are in.
Edit: missed out May!
(Jan|Feb|Mar|Apr|May|Jun|July|Aug|Sep|Oct|Nov|Dec) means match any of those items separated by |(Jan|Feb|Mar|Apr|May|Jun|July|Aug|Sep|Oct|Nov|Dec) \d, \d{4}
You should be able to make you own simple adaptation to find whatever format your dates are in.
Edit: missed out May!
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Writer: Find unformated dates in a document?
SWEET! I've played with your suggestion a bit and already enjoying great success.
I appreciate your help JeJe. Take care![Smile :)](./images/smilies/icon_smile.gif)
I appreciate your help JeJe. Take care
![Smile :)](./images/smilies/icon_smile.gif)
Apache Open Office 4.1.14. Windows 10