I want to match every string that cointains a year and a month name e.g. like that:
2022 Jul
or 2022 Jul
(and more spaces than 2) or even 2022Jul
.
The regex I have so far is:
"\\([0-9]\\{4\\}\\)"
And this will grab the year.
But now I don't know how to target the existence of spaces.
In JavaScript it would be something like:
[0-9]{4}\s*[A-Za-z]{3}
But I can't make it work in Emacs for anything ;(.
What strikes me the most is that there is ZERO!!! mention about spaces or whitespaces or breaks in the offical Emacs docs. Check for yourself: https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Special.html
And searching on Google doesn't bring anything useful.
Can you guys help how to target spaces in my regex example?
Can anybody help? I don't get the Regex in Emacs at all.
[:blank:]
and[:space:]
, and the page after that gnu.org/software/emacs/manual/html_node/elisp/… for syntax classes, e.g.,\s-