I currently have the code
$sPattern = "/<\/td><td>\(Shotgun\)(.*?)<\/td><td>/";
preg_match_all($sPattern,$homepage,$aMatch);
It works fine extracting multiple lines from a particular website but when it extracts them and echos them in an array it brings the </td><td> and </td><td> with it.
Is it possible to stop it from bringing those tags in the pattern with them?
Just echo what you’re capturing in the capturing group instead of the whole match:
If you want “(Shotgun)” in the output as well, modify your regex to capture it:
Then you can use the same code to print it out above.