Kingy Posted March 30, 2008 Share Posted March 30, 2008 I have the variable var titlePattern = "<a class=\"newstopic\" title=\"click here\" class=topic href=\"index.php?showtopic=XXXX\">(([^<]|.)+?)</div>" ; as you can see the XXXX will obviously change for each different news topic. how can i make it so this varible will just match any number? Link to comment https://forums.phpfreaks.com/topic/98708-matching-numbers/ Share on other sites More sharing options...
Psycho Posted March 31, 2008 Share Posted March 31, 2008 var titlePattern = "<a class=\"newstopic\" title=\"click here\" class=topic href=\"index.php?showtopic=(\d?)\">(([^<]|.)+?)</div>" ; Did you know you are missing the quotes around the class parameter value? Link to comment https://forums.phpfreaks.com/topic/98708-matching-numbers/#findComment-505862 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.