3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = '<input type="email" name="email_address" id="email_address" value="{default}" placeholder="user@domain.com">'; echo preg_replace('/<input([a-zA-Z_0-9 ={}"]*)type="email"([a-zA-Z_0-9 ={}"]*)\>/', '<input$1type="email"$2 value="lee@tth.media">', $str);
based on pHmJG
Output for 4.3.0 - 7.2.0
<input type="email" name="email_address" id="email_address" value="{default}" placeholder="user@domain.com">