I've been discovering the power of Larry Wall's "rename" command.  Some 
people think it allows use of the Perl \b (word boundary), but that seems 
not to be the case.  I think I did OK without it.

I had to rename files that include dates in the format yyyymmdd as part of 
the filename by changing that part to the corresponding date in yyyy-mm-dd 
format.  This seems to always work for me:

rename 's/(^|[^0-9])((19|20)\d\d)(0\d|1[012])([012]\d|3[01])($|[^0-9])/$1$2-$4-$5$6/g'

I'm assuming dates are between 1900-01-01 and 2099-12-31.

This cartoon is apropos:

https://xkcd.com/1179/

Mike