I need preg_match_all to match something like following:
<a href="cart.php?Stock=11.482&qty=1">Buy</a>
The code I'm using:
preg_match_all("'Stock=[^><]&qty=1\">Buy</a>'si", $source, $matches);
I need it to match everything before the &qty=1">Buy</a>
and after the <a href="cart.php?Stock=
, except the <
or >
characters. However, the following code does not work. Any suggestions?