<?php $re = '/(href=".*")/Uui'; $str = 'Donec sed odio dui. Morbi leo <a href="risus.pdf">risus</a>, porta ac consectetur ac, <a href="vestibulum.jpg">vestibulum</a> at eros.'; $subst = '$1 download'; $result = preg_replace($re, $subst, $str);echo $result;
Standard input is empty
Donec sed odio dui. Morbi leo <a href="risus.pdf" download>risus</a>, porta ac consectetur ac, <a href="vestibulum.jpg" download>vestibulum</a> at eros.
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!