3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $lines ="From: {Name|1} {Email|11} Phone / Skype: {Phone / Skype|8} removeIfEmpty Message Body: {Tell us more|9} Sender's IP: {ip} {refUTM} -- This e-mail was sent from a contact form on Software Development Company - Redwerk (http://redwerk.com)"; $pattern = "/^.*\bremoveIfEmpty\b.*$/m"; $matches = array(); preg_match($pattern, $lines, $matches); foreach($matches as $match) { var_dump($match); }
based on 31Sai
Output for 4.3.0 - 7.2.6
string(46) "Phone / Skype: {Phone / Skype|8} removeIfEmpty"