I have lot's of files , and i would like to remove some chapters from them. The "chapeters" i want to remove can not be removed via str_replace, because they are not a string, they are something like text text BIOGRAPHY book1 , bla bla bla bl book2 , bla bla bla bl book3 , bla bla bla bl book4 , bla bla bla bl </div></html> text text text So i would like to remove everything starting from BIOGRAPHY to </div></html> ....
heh ,does anybody know an understandable website about this preg_replace? for every dumbass like me?!
preg_replace isn't the end of the line when it comes to php scripting, as i used to think it was. http://www.regular-expressions.info/reference.html and it isn't quite as difficult as it looks, you just need to start practising. it's usually helpful if you can say in English what the regex actually implies, try using "The Regex Coach" (it's a windows software) - it explains regular expressions in English as you type them.