S SiKing Registered MemberEstablished Member ★ 20 ★ Impact 6 Oct 11, 2007 540 views 2 replies #1 Hi there. Just a quick one. I'm looking to get the string 'LS_Y45-80' from: HTML: sans-serif>LS_Y45-80<input type=hidden ... and store it in a variable. Thanks
Hi there. Just a quick one. I'm looking to get the string 'LS_Y45-80' from: HTML: sans-serif>LS_Y45-80<input type=hidden ... and store it in a variable. Thanks
Daniel Danltn.comVIP Member VIP ★ 15 ★ Impact 133 Oct 11, 2007 1 point #2 Call your variable $var. PHP: preg_match("/serif>(.*)<input/",$var,$matches); print_r($matches); It could obviously be made more precise by expanding it, it could also use [A-Z0-9_-] instead of .* But... Enjoy :p
Call your variable $var. PHP: preg_match("/serif>(.*)<input/",$var,$matches); print_r($matches); It could obviously be made more precise by expanding it, it could also use [A-Z0-9_-] instead of .* But... Enjoy :p
S SiKing Registered MemberEstablished Member ★ 20 ★ Impact 6 Oct 11, 2007 #3 Thanks Dan. Just the sort of thing I needed! (Rep left)