Perad Posted December 15, 2009 Share Posted December 15, 2009 Neither of these 2 work. Any idea why? $input = preg_replace('/target="(.*?)"/', '', $input); $input = preg_replace('/title="(.*?)"/', '', $input); Link to comment https://forums.phpfreaks.com/topic/185198-why-doesnt-this-match-work/ Share on other sites More sharing options...
cags Posted December 15, 2009 Share Posted December 15, 2009 Without you giving an example input and expected output there's nothing we can do to help. Link to comment https://forums.phpfreaks.com/topic/185198-why-doesnt-this-match-work/#findComment-977680 Share on other sites More sharing options...
nrg_alpha Posted December 15, 2009 Share Posted December 15, 2009 @Perad Posted in http://www.phpfreaks.com/forums/index.php/topic,176092.0.html: 1. Describe your problem or background that is important to it. 2. Give sample data (the input data, the haystack...etc..) 3. Give the expected output/matches from your sample data. 4. Give the actual output that you have if you've attempted something already. 5. Provide code if necessary, if your problem concerns it. 6. We assume its a php regex related as this is phpfreaks, but you still need to specifiy (if not obvious) if you are talking about POSIX (ereg) or PCRE (preg) flavor. 7. Be patient/grateful and don't demand things. Regex questions may take longer than expected to be answered, they're tougher sometimes. Link to comment https://forums.phpfreaks.com/topic/185198-why-doesnt-this-match-work/#findComment-977946 Share on other sites More sharing options...
nafetski Posted December 16, 2009 Share Posted December 16, 2009 Try changing it to $input = preg_replace('/target=".*?"/', '', $input); $input = preg_replace('/title=".*?"/', '', $input); Link to comment https://forums.phpfreaks.com/topic/185198-why-doesnt-this-match-work/#findComment-978316 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.