I started using Vimwiki to document weekly progress on my projects last year. As the year rolled on, the format of my list of links to weekly wikis changed a bit. At the end of the year I decided to quickly go through my index page and unify the format of the bullet points that I made, but I just can't get the regex correct.
A raw example of the bullets I want to update looks like the following, with the upper, more recent entries, in the format that I want.
* [[2018_Week_25|Week 25, 17th through the 23rd June]] * [[2018_Week_24|Week 24, 10th through 16th June]] * [[2018_Week_23|Week 23, 3rd through 9th June]] * [[2018 Week 22|Week 22, 27th May through 2nd June]] * [[2018 Week 21]], 20th through 26th May * [[2018_Week_20]] * [[2018_Week_19]] * [[2018_Week_18]], 29th April through 5th May * [[2018_Week_17]], 22nd through 28th April * [[2018_Week_16]], 15th through 21st April * [[2018_Week_15]], 8th through 14th April * [[2018_Week_14]], 1st through 7th April * [[2018_Week_13]], 25th through 31st March
I started out by doing a simple match:
Which matches the appropriate parts of lines 5, 8-13. Then I tried to throw in some pattern variables and substitutions, and everything fell apart. Using the following substitution line, Vim suddenly decided that the pattern that it was finding before was no longer to be found.
E486: Pattern not found: \(2018[_\s]Week[_\s]\d\d\),\s\(\d+\w+\)
I've actually tried quite a few subtle variants of this, but I am beginning to believe that I have simply overlooked something glaringly obvious. Does anyone have any suggestions?