Ok, I have some data in the form:
<a href="/praha/jaktovidi/_zprava/jak-to-vidi-rektor-richard-hindls-5-cervna--1220102"> <a href="/praha/jaktovidi/_zprava/jak-to-vidi-erik-best-4-cervna--1219526"> <a href="/praha/jaktovidi/_zprava/jak-to-vidi-ivan-hoffman-3-cervna--1218826"> <a href="/praha/jaktovidi/_zprava/jak-to-vidi-pavel-kosatik-19-kvetna-verejne-chci-podekovat-statnim-zastupcum-a-policistum-kteri-se-nebali--1225675"> and I'd like to change it to:
5-cervna <a href="/praha/jaktovidi/_zprava/jak-to-vidi-rektor-richard-hindls-5-cervna--1220102"> 4-cervna <a href="/praha/jaktovidi/_zprava/jak-to-vidi-erik-best-4-cervna--1219526"> 3-cervna <a href="/praha/jaktovidi/_zprava/jak-to-vidi-ivan-hoffman-3-cervna--1218826"> 19-kvetna <a href="/praha/jaktovidi/_zprava/jak-to-vidi-pavel-kosatik-19-kvetna-verejne-chci-podekovat-statnim-zastupcum-a-policistum-kteri-se-nebali--1225675"> ie. extract the date from the link and prepend it to the link. Is there a nice way to do this with regular expressions, or with some nice bash script? The number of dashes is not always the same and it's not "cervna" all the time either.
I've arrived to the following grep command which grabs the appropriate output, I just don't know how to paste it together with the original data:
grep -Po '[0-9]{1,2}-[[:alpha:]]*'