hello i will get right into it how can i use regex to capture information from a file which has a layout like so <object> text here more text and some more text </object> my question is how can i use regex to get just the 3 lines between <object> and </object> i tried to do it like so preg_match("/<object>(.*)</object>/",$html,$vidid); by using (.*) but it didnt work at all i know that this might be simple to some of you... so please any help on this would be very much appreciated Thank you
Below link would help. Using /m & /s can solve your problem. http://au2.php.net/reference.pcre.pattern.modifiers
Should be pretty simple. (^<object>)(.*)(</object>$) <object> text here more text and some more text </object> Check $2 and the result will be text here more text and some more text The only flags you will need for that regex is the dotall flag.