Well, I have recentely be coding many PHP applications relating to cURL and mainly I require using preg_replace for retrieving specific info. The problem is I am good @ cURL but not @ preg_replace, I just know this much preg_replace("^data before(.*)data after^", $source_code_of_page, $variable_to_contain_data); where (.*) is tteh data to be reduced. Can someone explain me more things like (.*) is for data to be taken. Mainly I wnat to know what is to be used to tell the script that there can be anything there an dit wont matter like -> preg_replace("^this is requiredanything can be here I dont carethis is required(.*)this is required^", $source_code_of_page, $variable_to_contain_data); Many thanks! Also if anyone can suggest me a godd place JUST FOR preg_replace except for the top 20 results returned by google, I shall be grateful.
Well you have to understand how preg works for for instance to tell it there are letters before the information do [a-z] or number [0-9] or cap letters [A-Z] . i personally use regexbuddy to do my preg calculations. i have read a little at some google searches about the basics and then just go from there .. ill see can i find some links for you