language: PHP (php 5.4.4)
date: 380 days 23 hours ago
link:
visibility: private
1
2
3
4
5
<?php
$testString = "Buy Widgets 20% discount with coupon code WID2010 by Friday";
preg_match("/(?=\w*[a-z])(?=\w*[0-9])\w+/i", $testString, $matches);
print_r($matches);
?>