How do I change string x*y to a*b
Where * can be any number of characters
e.g.
# cat f1
1/2/2004
15/2/2004
1/11/2004
15/11/2004
1/2/2005
15/2/2005
1/11/2005
15/11/2005
change "15/<any chars>/2005" to "20/<the any chars>/2006" resulting in
1/2/2004
15/2/2004
1/11/2004
15/11/2004
1/2/2005
20/2/2006
1/11/2005
20/11/2006
The closest I get is:
# cat f1 | sed 's!15/.*/2005!20/&/2006!'
1/2/2004
15/2/2004
1/11/2004
15/11/2004
1/2/2005
20/15/2/2005/2006
1/11/2005
20/15/11/2005/2006